Honor HideHelp and HideVersion
App.Run does not check a.Hide{Help,Version} before checking it, as a result customers cannot define their own -v flag (e.g. for verbose)
This commit is contained in:
parent
a65b733b30
commit
c80fcac42b
4
app.go
4
app.go
@ -123,11 +123,11 @@ func (a *App) Run(arguments []string) (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if checkHelp(context) {
|
if !a.HideHelp && checkHelp(context) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if checkVersion(context) {
|
if !a.HideVersion && checkVersion(context) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user