Harmonize BeforeError handling

This commit is contained in:
Aloïs Micard 2020-04-27 19:49:29 +02:00
parent 7a390105cb
commit 33744eb004
No known key found for this signature in database
GPG Key ID: 1A0EB82F071F5EFE

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