mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-19 20:37:35 +00:00
Merge pull request #4623 from rhatdan/errors
Ignore ErrCtrRemoved when removing a container
This commit is contained in:
commit
588156a9ef
1 changed files with 2 additions and 1 deletions
|
|
@ -461,7 +461,8 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode
|
|||
|
||||
if c.IsSet("rm") {
|
||||
if err := r.Runtime.RemoveContainer(ctx, ctr, false, true); err != nil {
|
||||
if errors.Cause(err) == define.ErrNoSuchCtr {
|
||||
if errors.Cause(err) == define.ErrNoSuchCtr ||
|
||||
errors.Cause(err) == define.ErrCtrRemoved {
|
||||
logrus.Warnf("Container %s does not exist: %v", ctr.ID(), err)
|
||||
} else {
|
||||
logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue