From 2eda555ebef190072cc38e85168e38f1f846f139 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 3 Dec 2019 04:14:57 +0100 Subject: Ignore ErrCtrRemoved when removing a container Signed-off-by: Daniel J Walsh --- pkg/adapter/containers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-54-g00ecf