From 85db895012bead6b48aff9232d3429ed62fac045 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 5 Mar 2019 13:41:12 +0100 Subject: 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 --- cmd/podman/rm.go | 3 +++ 1 file changed, 3 insertions(+) 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()) } } -- cgit v1.2.3-54-g00ecf