diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-09 21:48:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-09 21:48:30 +0200 |
commit | 9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba (patch) | |
tree | b048b0e2228fa9ae67c9a73bd4fecf1739f64d75 /cmd/podman/volume_rm.go | |
parent | 7042a3d7a539bae79ed63bdc87f432b8ec73afd8 (diff) | |
parent | 046178e55f72ed9db7cf5898d3be91b0112ab94f (diff) | |
download | podman-9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba.tar.gz podman-9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba.tar.bz2 podman-9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba.zip |
Merge pull request #3896 from mheon/volume_lookup
Add ability to look up volumes by unambiguous partial name
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) } |