Harmonize BeforeError handling

main
Aloïs Micard 4 years ago
parent 7a390105cb
commit 33744eb004
No known key found for this signature in database
GPG Key ID: 1A0EB82F071F5EFE

@ -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

Loading…
Cancel
Save