diff options
author | Anders F Björklund <anders.f.bjorklund@gmail.com> | 2021-10-06 21:35:25 +0200 |
---|---|---|
committer | Anders F Björklund <anders.f.bjorklund@gmail.com> | 2021-11-02 22:26:04 +0100 |
commit | 6e6388eac4a6e7bc771452102b87b78e40aaa65c (patch) | |
tree | 279fc92c8aa78a2e9297f71fd2547ef9a5e1e913 | |
parent | 85bad0cc7c68b71ab7ddb6ed09b862145c6c6d0e (diff) | |
download | podman-6e6388eac4a6e7bc771452102b87b78e40aaa65c.tar.gz podman-6e6388eac4a6e7bc771452102b87b78e40aaa65c.tar.bz2 podman-6e6388eac4a6e7bc771452102b87b78e40aaa65c.zip |
Make stop message more similar to start
[NO TESTS NEEDED]
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
-rw-r--r-- | cmd/podman/machine/stop.go | 8 | ||||
-rw-r--r-- | pkg/machine/qemu/machine.go | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/machine/stop.go b/cmd/podman/machine/stop.go index 76ba85601..75666f734 100644 --- a/cmd/podman/machine/stop.go +++ b/cmd/podman/machine/stop.go @@ -3,6 +3,8 @@ package machine import ( + "fmt" + "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/pkg/machine" "github.com/containers/podman/v3/pkg/machine/qemu" @@ -46,5 +48,9 @@ func stop(cmd *cobra.Command, args []string) error { if err != nil { return err } - return vm.Stop(vmName, machine.StopOptions{}) + if err := vm.Stop(vmName, machine.StopOptions{}); err != nil { + return err + } + fmt.Printf("Machine %q stopped successfully\n", vmName) + return nil } diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 4d8242e39..a7174aac3 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -398,7 +398,6 @@ func (v *MachineVM) Stop(name string, _ machine.StopOptions) error { return err } - fmt.Printf("Successfully stopped machine: %s", name) return nil } |