mirror of
https://github.com/containers/podman.git
synced 2025-08-26 11:33:07 +08:00
machine rm -f stops and removes machine
If you want to remove a running machine, you can now pass the --force/-f to podman machine rm and the machine will be stopped and removed without confirmations. Fixes: #13448 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -37,7 +37,7 @@ func init() {
|
||||
|
||||
flags := rmCmd.Flags()
|
||||
formatFlagName := "force"
|
||||
flags.BoolVar(&destoryOptions.Force, formatFlagName, false, "Do not prompt before rming")
|
||||
flags.BoolVarP(&destoryOptions.Force, formatFlagName, "f", false, "Stop and do not prompt before rming")
|
||||
|
||||
keysFlagName := "save-keys"
|
||||
flags.BoolVar(&destoryOptions.SaveKeys, keysFlagName, false, "Do not delete SSH keys")
|
||||
@ -64,7 +64,7 @@ func rm(cmd *cobra.Command, args []string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
confirmationMessage, remove, err := vm.Remove(vmName, machine.RemoveOptions{})
|
||||
confirmationMessage, remove, err := vm.Remove(vmName, destoryOptions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user