aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pods_prune.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pods_prune.go')
-rw-r--r--cmd/podman/pods_prune.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/pods_prune.go b/cmd/podman/pods_prune.go
index bdd75f9de..d40e37bdb 100644
--- a/cmd/podman/pods_prune.go
+++ b/cmd/podman/pods_prune.go
@@ -40,8 +40,11 @@ func podPruneCmd(c *cliconfig.PodPruneValues) error {
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer runtime.Shutdown(false)
+ defer runtime.DeferredShutdown(false)
ok, failures, err := runtime.PrunePods(getContext(), c)
+ if err != nil {
+ return err
+ }
return printCmdResults(ok, failures)
}