diff options
author | TomSweeneyRedHat <tsweeney@redhat.com> | 2019-07-29 18:43:56 -0400 |
---|---|---|
committer | TomSweeneyRedHat <tsweeney@redhat.com> | 2019-07-30 09:05:48 -0400 |
commit | 0b14e535902921a9de6e6571632219bb6327c621 (patch) | |
tree | 4c635699dc19e34175f4443a20cacd9bdee099bf /cmd/podman | |
parent | 040355d450aa7282071813c9517b50b901c9e497 (diff) | |
download | podman-0b14e535902921a9de6e6571632219bb6327c621.tar.gz podman-0b14e535902921a9de6e6571632219bb6327c621.tar.bz2 podman-0b14e535902921a9de6e6571632219bb6327c621.zip |
Touch up input argument error on create
Add an error when there are not enough input arguments for remote
create. Addresses comments in #3656
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/shared/create.go | 2 |
1 files changed, 2 insertions, 0 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 { |