Do not attempt to use command --args as cli flags

i.e. kpod run fedora python --version

Signed-off-by: baude <bbaude@redhat.com>

Closes: #33
Approved by: rhatdan
This commit is contained in:
baude 2017-11-07 13:41:25 -06:00 committed by Atomic Bot
parent 84e3bdceda
commit b8dca1874d
2 changed files with 14 additions and 12 deletions

View File

@ -123,12 +123,13 @@ var createDescription = "Creates a new container from the given image or" +
" will be created with the initial state 'created'." " will be created with the initial state 'created'."
var createCommand = cli.Command{ var createCommand = cli.Command{
Name: "create", Name: "create",
Usage: "create but do not start a container", Usage: "create but do not start a container",
Description: createDescription, Description: createDescription,
Flags: createFlags, Flags: createFlags,
Action: createCmd, Action: createCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]", ArgsUsage: "IMAGE [COMMAND [ARG...]]",
SkipArgReorder: true,
} }
func createCmd(c *cli.Context) error { func createCmd(c *cli.Context) error {

View File

@ -12,12 +12,13 @@ import (
var runDescription = "Runs a command in a new container from the given image" var runDescription = "Runs a command in a new container from the given image"
var runCommand = cli.Command{ var runCommand = cli.Command{
Name: "run", Name: "run",
Usage: "run a command in a new container", Usage: "run a command in a new container",
Description: runDescription, Description: runDescription,
Flags: createFlags, Flags: createFlags,
Action: runCmd, Action: runCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]", ArgsUsage: "IMAGE [COMMAND [ARG...]]",
SkipArgReorder: true,
} }
func runCmd(c *cli.Context) error { func runCmd(c *cli.Context) error {