diff --git a/app.go b/app.go index 1a77f3b..9a15c0c 100644 --- a/app.go +++ b/app.go @@ -138,10 +138,12 @@ func (a *App) Run(arguments []string) (err error) { } if !a.HideHelp && checkHelp(context) { + ShowAppHelp(context) return nil } if !a.HideVersion && checkVersion(context) { + ShowVersion(context) return nil } diff --git a/help.go b/help.go index 5bfe401..a246f63 100644 --- a/help.go +++ b/help.go @@ -190,7 +190,6 @@ func checkVersion(c *Context) bool { if VersionFlag.Name != "" { eachName(VersionFlag.Name, func(name string) { if c.GlobalBool(name) || c.Bool(name) { - ShowVersion(c) found = true } }) @@ -203,7 +202,6 @@ func checkHelp(c *Context) bool { if HelpFlag.Name != "" { eachName(HelpFlag.Name, func(name string) { if c.GlobalBool(name) || c.Bool(name) { - ShowAppHelp(c) found = true } })