diff options
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r-- | cmd/podman/create.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go index af065817f..8f9e82805 100644 --- a/cmd/podman/create.go +++ b/cmd/podman/create.go @@ -159,6 +159,9 @@ func createCmd(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")) } |