diff options
Diffstat (limited to 'cmd/podman/shared/create.go')
-rw-r--r-- | cmd/podman/shared/create.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 1ef852cd2..d2bd23e3e 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -41,6 +41,9 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod. span, _ := opentracing.StartSpanFromContext(ctx, "createContainer") defer span.Finish() } + if c.Bool("rm") && c.String("restart") != "" && c.String("restart") != "no" { + return nil, nil, errors.Errorf("the --rm flag conflicts with --restart") + } rtc, err := runtime.GetConfig() if err != nil { |