aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-12-03 04:14:57 +0100
committerDaniel J Walsh <dwalsh@redhat.com>2019-12-03 04:14:57 +0100
commit2eda555ebef190072cc38e85168e38f1f846f139 (patch)
tree69d1a91d73ef7112a5aff97a29dce754c17d8133 /pkg
parentc9696c451df1efe181c103f9f227787af14dd7b1 (diff)
downloadpodman-2eda555ebef190072cc38e85168e38f1f846f139.tar.gz
podman-2eda555ebef190072cc38e85168e38f1f846f139.tar.bz2
podman-2eda555ebef190072cc38e85168e38f1f846f139.zip
Ignore ErrCtrRemoved when removing a container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/adapter/containers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 2b838452c..0c73977c7 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -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)