mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
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>
This commit is contained in:
@ -80,6 +80,9 @@ func rmCmd(c *cliconfig.RmValues) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Cause(err) == libpod.ErrNoSuchCtr {
|
||||||
|
exitCode = 1
|
||||||
|
}
|
||||||
fmt.Println(err.Error())
|
fmt.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user