Harmonize BeforeError handling
This commit is contained in:
parent
7a390105cb
commit
33744eb004
2
app.go
2
app.go
@ -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…
Reference in New Issue
Block a user