Usage/Description/ArgsUsage correctly copied when using subcommand

This commit is contained in:
Joe Richey
2017-01-09 15:57:49 -08:00
parent 0bdeddeeb0
commit 0083ae8732
2 changed files with 4 additions and 6 deletions

View File

@@ -230,11 +230,9 @@ func (c Command) startApp(ctx *Context) error {
app.HelpName = app.Name
}
if c.Description != "" {
app.Usage = c.Description
} else {
app.Usage = c.Usage
}
app.Usage = c.Usage
app.Description = c.Description
app.ArgsUsage = c.ArgsUsage
// set CommandNotFound
app.CommandNotFound = ctx.App.CommandNotFound