mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
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
This commit is contained in:
@ -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())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user