Skip to content

Commit b6c09e3

Browse files
committed
Harmonize BeforeError handling
1 parent 1e44266 commit b6c09e3

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

app.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,6 @@ func (a *App) Run(arguments []string) (err error) {
263263
if a.Before != nil {
264264
beforeErr := a.Before(context)
265265
if beforeErr != nil {
266-
_, _ = fmt.Fprintf(a.Writer, "%v\n\n", beforeErr)
267-
_ = ShowAppHelp(context)
268266
a.handleExitCoder(context, beforeErr)
269267
err = beforeErr
270268
return err

command.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ func (c Command) Run(ctx *Context) (err error) {
161161
if c.Before != nil {
162162
err = c.Before(context)
163163
if err != nil {
164-
_ = ShowCommandHelp(context, c.Name)
165164
context.App.handleExitCoder(context, err)
166165
return err
167166
}

0 commit comments

Comments
 (0)