diff options
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/shared/create.go | 2 | ||||
-rw-r--r-- | cmd/podman/shared/parse/parse.go | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 43b1b4067..4de68e4bc 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -80,6 +80,8 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod. name := "" if len(c.InputArgs) != 0 { name = c.InputArgs[0] + } else { + return nil, nil, errors.Errorf("error, no input arguments were provided") } newImage, err := runtime.ImageRuntime().New(ctx, name, rtc.SignaturePolicyPath, GetAuthFile(""), writer, nil, image.SigningOptions{}, false, nil) if err != nil { diff --git a/cmd/podman/shared/parse/parse.go b/cmd/podman/shared/parse/parse.go index 9fbc92fc3..3a75ff7a8 100644 --- a/cmd/podman/shared/parse/parse.go +++ b/cmd/podman/shared/parse/parse.go @@ -126,8 +126,9 @@ func parseEnv(env map[string]string, line string) error { } } else { // if only a pass-through variable is given, clean it up. - val, _ := os.LookupEnv(name) - env[name] = val + if val, ok := os.LookupEnv(name); ok { + env[name] = val + } } } return nil |