diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-11-08 08:47:53 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-11-08 21:18:08 +0000 |
commit | 84e3bdceda8d4683c823f16dffaee57e2d861cdc (patch) | |
tree | 09fc2b61b2c3dbfc04a8218a6dbf05a99a6e2ff8 | |
parent | 0e2fc603d9cbb21d72a548af087dd6b09a3bed1b (diff) | |
download | podman-84e3bdceda8d4683c823f16dffaee57e2d861cdc.tar.gz podman-84e3bdceda8d4683c823f16dffaee57e2d861cdc.tar.bz2 podman-84e3bdceda8d4683c823f16dffaee57e2d861cdc.zip |
Fix panic when no image is given
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #31
Approved by: mheon
-rw-r--r-- | cmd/kpod/create.go | 4 |
1 files 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:] } |