From 2e791680b49878c707c78b72769188d8cb55df03 Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Fri, 23 Apr 2021 13:04:03 -0700 Subject: [PATCH] The delete command should always remove a machine, even when already stopped Signed-off-by: Jan Dubois --- cmd/delete.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/delete.go b/cmd/delete.go index 6431001..54a0d2d 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -2,6 +2,7 @@ package cmd import ( "fmt" + "os" "github.com/spf13/cobra" ) @@ -28,7 +29,7 @@ func deleteCommand(cmd *cobra.Command, args []string) error { fmt.Println("Powering down machine now...") if err = host.Stop(); err != nil { - return err + fmt.Fprintf(os.Stderr, "Could not stop machine: %v\nWill proceed to delete configuration\n", err) } return api.Remove(machineName) }