summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/rmi.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go
index e29f32c7c..fdeab6b80 100644
--- a/cmd/podman/rmi.go
+++ b/cmd/podman/rmi.go
@@ -111,6 +111,13 @@ func rmiCmd(c *cli.Context) error {
}
}
+ // If the user calls remove all and there are none, it should not be a
+ // non-zero exit
+ if !deleted && removeAll {
+ return nil
+ }
+ // the user tries to remove images that do not exist, that should be a
+ // non-zero exit
if !deleted {
return errors.Errorf("no valid images to delete")
}