mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Fix panic when no image is given
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #31 Approved by: mheon
This commit is contained in:

committed by
Atomic Bot

parent
0e2fc603d9
commit
84e3bdceda
@ -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:]
|
||||
}
|
||||
|
Reference in New Issue
Block a user