diff --git a/app.go b/app.go index 2f992d0..6884920 100644 --- a/app.go +++ b/app.go @@ -164,6 +164,9 @@ func (a *App) Run(arguments []string) (err error) { if a.Before != nil { err := a.Before(context) if err != nil { + fmt.Fprintln(a.Writer, err) + fmt.Fprintln(a.Writer) + ShowAppHelp(context) return err } } diff --git a/command.go b/command.go index 23eca5a..e42178e 100644 --- a/command.go +++ b/command.go @@ -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 } }