Correctly show help message if -h
is provided to subcommand
Currently, if an action is specified on a subcommand, it ignores the `-h` and `--help` flags if passed to the subcommand, e.g.: `foo bar -h` would call the default action on `bar` rather than show the help documentation. Fixes #477
This commit is contained in:
parent
73aa67b7a2
commit
65da20beab
@ -908,6 +908,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) {
|
||||
Name: "foo",
|
||||
Description: "descriptive wall of text about how it does foo things",
|
||||
Subcommands: []Command{subCmdBar, subCmdBaz},
|
||||
Action: func(c *Context) error { return nil },
|
||||
}
|
||||
|
||||
app.Commands = []Command{cmd}
|
||||
|
Loading…
Reference in New Issue
Block a user