summaryrefslogtreecommitdiff
path: root/cmd/podman/cleanup.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/cleanup.go')
-rw-r--r--cmd/podman/cleanup.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/cleanup.go b/cmd/podman/cleanup.go
index 6ebb682ed..316704f91 100644
--- a/cmd/podman/cleanup.go
+++ b/cmd/podman/cleanup.go
@@ -46,6 +46,8 @@ func cleanupCmd(c *cli.Context) error {
args := c.Args()
+ ctx := getContext()
+
var lastError error
var cleanupContainers []*libpod.Container
if c.Bool("all") {
@@ -80,7 +82,7 @@ func cleanupCmd(c *cli.Context) error {
}
}
for _, ctr := range cleanupContainers {
- if err = ctr.Cleanup(); err != nil {
+ if err = ctr.Cleanup(ctx); err != nil {
if lastError != nil {
fmt.Fprintln(os.Stderr, lastError)
}