Set writer when running command as app
Also add test from https://github.com/codegangsta/cli/pull/202 with slight modifications.
This commit is contained in:
@@ -157,6 +157,7 @@ func (c Command) startApp(ctx *Context) error {
|
||||
app.Commands = c.Subcommands
|
||||
app.Flags = c.Flags
|
||||
app.HideHelp = c.HideHelp
|
||||
app.Writer = ctx.App.Writer
|
||||
|
||||
// bash completion
|
||||
app.EnableBashCompletion = ctx.App.EnableBashCompletion
|
||||
|
Reference in New Issue
Block a user