Also show help if App/Command Before produces error.
This commit is contained in:
@@ -149,6 +149,9 @@ func (c Command) Run(ctx *Context) (err error) {
|
||||
if c.Before != nil {
|
||||
err := c.Before(context)
|
||||
if err != nil {
|
||||
fmt.Fprintln(ctx.App.Writer, err)
|
||||
fmt.Fprintln(ctx.App.Writer)
|
||||
ShowCommandHelp(ctx, c.Name)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user