Pass the ErrWriter on the root app to subcommands

This commit is contained in:
Robert Bittle
2017-01-18 23:29:26 -05:00
parent f1be59ff3d
commit 4ed366e201
2 changed files with 30 additions and 0 deletions

View File

@@ -264,6 +264,7 @@ func (c Command) startApp(ctx *Context) error {
app.Author = ctx.App.Author
app.Email = ctx.App.Email
app.Writer = ctx.App.Writer
app.ErrWriter = ctx.App.ErrWriter
app.categories = CommandCategories{}
for _, command := range c.Subcommands {