summaryrefslogtreecommitdiff
path: root/vendor/github.com/urfave/cli/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/urfave/cli/command.go')
-rw-r--r--vendor/github.com/urfave/cli/command.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/urfave/cli/command.go b/vendor/github.com/urfave/cli/command.go
index c9ba5ec68..56b633c1a 100644
--- a/vendor/github.com/urfave/cli/command.go
+++ b/vendor/github.com/urfave/cli/command.go
@@ -204,7 +204,7 @@ PARSE:
newArgs := Args{}
for i, arg := range args {
if arg != trimmed {
- newArgs = append(newArgs, trimmed)
+ newArgs = append(newArgs, arg)
continue
}
shortOpts := translateShortOptions(set, Args{trimmed})
@@ -215,7 +215,12 @@ PARSE:
newArgs = append(newArgs, shortOpts...)
newArgs = append(newArgs, args[i+1:]...)
args = newArgs
- // now parse again
+ // now reset the flagset parse again
+ set, err = flagSet(c.Name, c.Flags)
+ if err != nil {
+ return nil, err
+ }
+ set.SetOutput(ioutil.Discard)
goto PARSE
}
}