From 84e3bdceda8d4683c823f16dffaee57e2d861cdc Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 8 Nov 2017 08:47:53 -0500 Subject: Fix panic when no image is given Signed-off-by: Daniel J Walsh Closes: #31 Approved by: mheon --- cmd/kpod/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go index caee0c7f0..f2b8898ca 100644 --- a/cmd/kpod/create.go +++ b/cmd/kpod/create.go @@ -242,11 +242,11 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime) (*createConfig, er var blkioWeight uint16 var uid, gid uint32 - image := c.Args()[0] - if len(c.Args()) < 1 { return nil, errors.Errorf("image name or ID is required") } + image := c.Args()[0] + if len(c.Args()) > 1 { command = c.Args()[1:] } -- cgit v1.2.3-54-g00ecf