diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-05 13:41:12 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-05 13:41:17 +0100 |
commit | 85db895012bead6b48aff9232d3429ed62fac045 (patch) | |
tree | 5b337a335e0da14d463105dc18fb687575361d95 /cmd/podman/rm.go | |
parent | 4b80517b6a638ff06f8ad432f0f0f5839283d058 (diff) | |
download | podman-85db895012bead6b48aff9232d3429ed62fac045.tar.gz podman-85db895012bead6b48aff9232d3429ed62fac045.tar.bz2 podman-85db895012bead6b48aff9232d3429ed62fac045.zip |
rm: set exit code to 1 if a specified container is not found
Closes: https://github.com/containers/libpod/issues/2539
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd/podman/rm.go')
-rw-r--r-- | cmd/podman/rm.go | 3 |
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()) } } |