Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
The delete command should always remove a machine, even when already …
Browse files Browse the repository at this point in the history
…stopped

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
  • Loading branch information
jandubois committed Apr 23, 2021
1 parent 4a11491 commit 2e79168
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
)
Expand All @@ -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)
}

0 comments on commit 2e79168

Please sign in to comment.