add missing ExitErrHandler in command + matching test, fixing #816

This commit is contained in:
FaranIdo
2019-08-12 00:29:46 +03:00
parent 7e49cc210a
commit 08c24e22ed
2 changed files with 55 additions and 0 deletions
+1
View File
@@ -268,6 +268,7 @@ func (c Command) HasName(name string) bool {
func (c Command) startApp(ctx *Context) error {
app := NewApp()
app.Metadata = ctx.App.Metadata
app.ExitErrHandler = ctx.App.ExitErrHandler
// set the name and usage
app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
if c.HelpName == "" {