Subcommand OnUsageError should be passed to app
Not all of the Command components were being passed to the created App in the startApp function.
This commit is contained in:
@@ -291,6 +291,7 @@ func (c Command) startApp(ctx *Context) error {
|
||||
} else {
|
||||
app.Action = helpSubcommand.Action
|
||||
}
|
||||
app.OnUsageError = c.OnUsageError
|
||||
|
||||
for index, cc := range app.Commands {
|
||||
app.Commands[index].commandNamePath = []string{c.Name, cc.Name}
|
||||
|
Reference in New Issue
Block a user