summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-05 06:21:45 -0800
committerGitHub <noreply@github.com>2019-03-05 06:21:45 -0800
commitb62540c6d5a424d3396dd097dd695c3dfb2db6ce (patch)
treeb2f6202c11d36831e72da7b9649c9e3bdc56c0d7
parent05822a4da92a01c28aa824ac347c8c2fc8f118b4 (diff)
parent85db895012bead6b48aff9232d3429ed62fac045 (diff)
downloadpodman-b62540c6d5a424d3396dd097dd695c3dfb2db6ce.tar.gz
podman-b62540c6d5a424d3396dd097dd695c3dfb2db6ce.tar.bz2
podman-b62540c6d5a424d3396dd097dd695c3dfb2db6ce.zip
Merge pull request #2540 from giuseppe/rm-error-1-if-no-ctr
rm: set exit code to 1 if a specified container is not found
-rw-r--r--cmd/podman/rm.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/rm.go b/cmd/podman/rm.go
index 61b049840..d23f8228c 100644
--- a/cmd/podman/rm.go
+++ b/cmd/podman/rm.go
@@ -80,6 +80,9 @@ func rmCmd(c *cliconfig.RmValues) error {
return err
}
if err != nil {
+ if errors.Cause(err) == libpod.ErrNoSuchCtr {
+ exitCode = 1
+ }
fmt.Println(err.Error())
}
}