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'."
var createCommand = cli.Command{
Name: "create",
Usage: "create but do not start a container",
Description: createDescription,
Flags: createFlags,
Action: createCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]",
Name: "create",
Usage: "create but do not start a container",
Description: createDescription,
Flags: createFlags,
Action: createCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]",
SkipArgReorder: true,
}
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 runCommand = cli.Command{
Name: "run",
Usage: "run a command in a new container",
Description: runDescription,
Flags: createFlags,
Action: runCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]",
Name: "run",
Usage: "run a command in a new container",
Description: runDescription,
Flags: createFlags,
Action: runCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]",
SkipArgReorder: true,
}
func runCmd(c *cli.Context) error {