Merge remote-tracking branch 'origin/master' into completion_fix

This commit is contained in:
Joshua Rubin
2016-11-18 09:28:39 -07:00
14 changed files with 607 additions and 76 deletions

View File

@@ -87,7 +87,10 @@ func (c Command) Run(ctx *Context) (err error) {
)
}
set := flagSet(c.Name, c.Flags)
set, err := flagSet(c.Name, c.Flags)
if err != nil {
return err
}
set.SetOutput(ioutil.Discard)
if c.SkipFlagParsing {
@@ -182,6 +185,10 @@ func (c Command) Run(ctx *Context) (err error) {
}
}
if c.Action == nil {
c.Action = helpSubcommand.Action
}
context.Command = c
err = HandleAction(c.Action, context)