Harmonize BeforeError handling

This commit is contained in:
Aloïs Micard
2020-04-27 19:49:29 +02:00
parent 7a390105cb
commit 33744eb004

2
app.go
View File

@@ -292,8 +292,6 @@ func (a *App) RunContext(ctx context.Context, arguments []string) (err error) {
if a.Before != nil {
beforeErr := a.Before(context)
if beforeErr != nil {
_, _ = fmt.Fprintf(a.Writer, "%v\n\n", beforeErr)
_ = ShowAppHelp(context)
a.handleExitCoder(context, beforeErr)
err = beforeErr
return err