feat: prompt for confirmation on storage:destroy

`storage:destroy` now prompts for confirmation before removing a named storage entry, matching the behavior of other destructive commands such as `apps:destroy` and `network:destroy`. The prompt can be skipped with the `--force` flag or the global `dokku --force` flag for non-interactive callers.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-29 14:31:20 -04:00
parent d003bfaf0e
commit 3493869fa4
6 changed files with 108 additions and 12 deletions

View File

@@ -20,7 +20,7 @@ Additional commands:`
helpContent = `
storage:create <name> [<path>] [flags], Register a named storage entry
storage:destroy <name>, Remove a named storage entry (must be unmounted from every app first)
storage:destroy <name> [--force], Remove a named storage entry (must be unmounted from every app first)
storage:ensure-directory [--chown option] <directory>, [DEPRECATED] use storage:create instead
storage:exec <name> [-- <cmd>...], Run a command (or shell) in a temporary container that mounts the entry
storage:info <name> [--format text|json], Show details for one storage entry