diff options
Diffstat (limited to 'cmd/podman/volume_rm.go')
-rw-r--r-- | cmd/podman/volume_rm.go | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/cmd/podman/volume_rm.go b/cmd/podman/volume_rm.go index 0141d06da..2fa6a8d03 100644 --- a/cmd/podman/volume_rm.go +++ b/cmd/podman/volume_rm.go @@ -1,8 +1,6 @@ package main import ( - "fmt" - "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/pkg/adapter" "github.com/pkg/errors" @@ -52,19 +50,9 @@ func volumeRmCmd(c *cliconfig.VolumeRmValues) error { return errors.Wrapf(err, "error creating libpod runtime") } defer runtime.DeferredShutdown(false) - deletedVolumeNames, err := runtime.RemoveVolumes(getContext(), c) + deletedVolumeNames, deletedVolumeErrors, err := runtime.RemoveVolumes(getContext(), c) if err != nil { - if len(deletedVolumeNames) > 0 { - printDeleteVolumes(deletedVolumeNames) - return err - } - } - printDeleteVolumes(deletedVolumeNames) - return err -} - -func printDeleteVolumes(volumes []string) { - for _, v := range volumes { - fmt.Println(v) + return err } + return printCmdResults(deletedVolumeNames, deletedVolumeErrors) } |