summaryrefslogtreecommitdiff
path: root/cmd/podman/pods/prune.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-01 21:08:50 +0200
committerGitHub <noreply@github.com>2020-05-01 21:08:50 +0200
commitbffd3f5134b6c64dc53b7713bd064a9edd3ee466 (patch)
treee50040bd5304f82542c5d8e51cfff98ac8ffbdb9 /cmd/podman/pods/prune.go
parent95b9b72c0c0c6904ca35c97c76ee728b1750bf84 (diff)
parentb94862171b29dbef4cd780e4b1746d97f62f7a94 (diff)
downloadpodman-bffd3f5134b6c64dc53b7713bd064a9edd3ee466.tar.gz
podman-bffd3f5134b6c64dc53b7713bd064a9edd3ee466.tar.bz2
podman-bffd3f5134b6c64dc53b7713bd064a9edd3ee466.zip
Merge pull request #6060 from sujil02/systemprune-v2
And system prune feature for v2.
Diffstat (limited to 'cmd/podman/pods/prune.go')
-rw-r--r--cmd/podman/pods/prune.go13
1 files changed, 1 insertions, 12 deletions
diff --git a/cmd/podman/pods/prune.go b/cmd/podman/pods/prune.go
index 091e3375b..bc15d8035 100644
--- a/cmd/podman/pods/prune.go
+++ b/cmd/podman/pods/prune.go
@@ -41,9 +41,6 @@ func init() {
}
func prune(cmd *cobra.Command, args []string) error {
- var (
- errs utils.OutputErrors
- )
if len(args) > 0 {
return errors.Errorf("`%s` takes no arguments", cmd.CommandPath())
}
@@ -60,16 +57,8 @@ func prune(cmd *cobra.Command, args []string) error {
}
}
responses, err := registry.ContainerEngine().PodPrune(context.Background(), pruneOptions)
-
if err != nil {
return err
}
- for _, r := range responses {
- if r.Err == nil {
- fmt.Println(r.Id)
- } else {
- errs = append(errs, r.Err)
- }
- }
- return errs.PrintErrors()
+ return utils.PrintPodPruneResults(responses)
}