Skip to content

Commit

Permalink
Harmonize BeforeError handling
Browse files Browse the repository at this point in the history
  • Loading branch information
VirrageS committed May 5, 2020
1 parent 1e44266 commit b6c09e3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ func (a *App) Run(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
Expand Down
1 change: 0 additions & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ func (c Command) Run(ctx *Context) (err error) {
if c.Before != nil {
err = c.Before(context)
if err != nil {
_ = ShowCommandHelp(context, c.Name)
context.App.handleExitCoder(context, err)
return err
}
Expand Down

0 comments on commit b6c09e3

Please sign in to comment.