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:
OpenShift Merge Robot
2019-03-05 06:21:45 -08:00
committed by GitHub

View File

@ -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())
}
}