summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/run.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index 06bc0e9df..5247f536c 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -227,7 +227,10 @@ func runCmd(c *cli.Context) error {
if err := ctr.Cleanup(); err != nil {
// If the container has been removed already, no need to error on cleanup
- if errors.Cause(err) == libpod.ErrNoSuchCtr || errors.Cause(err) == libpod.ErrCtrRemoved {
+ // Also, if it was restarted, don't error either
+ if errors.Cause(err) == libpod.ErrNoSuchCtr ||
+ errors.Cause(err) == libpod.ErrCtrRemoved ||
+ errors.Cause(err) == libpod.ErrCtrStateInvalid {
return nil
}