summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2019-07-29 18:43:56 -0400
committerTomSweeneyRedHat <tsweeney@redhat.com>2019-07-30 09:05:48 -0400
commit0b14e535902921a9de6e6571632219bb6327c621 (patch)
tree4c635699dc19e34175f4443a20cacd9bdee099bf /cmd/podman/shared
parent040355d450aa7282071813c9517b50b901c9e497 (diff)
downloadpodman-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/shared')
-rw-r--r--cmd/podman/shared/create.go2
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 {