Harmonize BeforeError usage in Command#Run
This commit is contained in:
parent
33744eb004
commit
c261e4dbd3
@ -150,7 +150,6 @@ func (c *Command) Run(ctx *Context) (err error) {
|
|||||||
if c.Before != nil {
|
if c.Before != nil {
|
||||||
err = c.Before(context)
|
err = c.Before(context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = ShowCommandHelp(context, c.Name)
|
|
||||||
context.App.handleExitCoder(context, err)
|
context.App.handleExitCoder(context, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user