diff options
Diffstat (limited to 'cmd/podman/run.go')
-rw-r--r-- | cmd/podman/run.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 53b7083e3..523b973fb 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -37,6 +37,9 @@ func runCmd(c *cli.Context) error { } if c.String("cidfile") != "" { + if _, err := os.Stat(c.String("cidfile")); err == nil { + return errors.Errorf("container id file exists. ensure another container is not using it or delete %s", c.String("cidfile")) + } if err := libpod.WriteFile("", c.String("cidfile")); err != nil { return errors.Wrapf(err, "unable to write cidfile %s", c.String("cidfile")) } |