From b8dca1874dfec01b1782f1308f26b58f315424cd Mon Sep 17 00:00:00 2001 From: baude Date: Tue, 7 Nov 2017 13:41:25 -0600 Subject: Do not attempt to use command --args as cli flags i.e. kpod run fedora python --version Signed-off-by: baude Closes: #33 Approved by: rhatdan --- cmd/kpod/create.go | 13 +++++++------ cmd/kpod/run.go | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go index f2b8898ca..55f02e8e6 100644 --- a/cmd/kpod/create.go +++ b/cmd/kpod/create.go @@ -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 { diff --git a/cmd/kpod/run.go b/cmd/kpod/run.go index 904977940..6b67b55cd 100644 --- a/cmd/kpod/run.go +++ b/cmd/kpod/run.go @@ -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 { -- cgit v1.2.3-54-g00ecf