Allow hiding of help flag without hiding help subcommand

By utilizing struct zero value
This commit is contained in:
jszwedko
2014-12-01 23:20:21 -05:00
parent 9908e96513
commit 780f839a02
4 changed files with 26 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ func (c Command) Run(ctx *Context) error {
return c.startApp(ctx)
}
if !c.HideHelp {
if !c.HideHelp && (HelpFlag != BoolFlag{}) {
// append help to flags
c.Flags = append(
c.Flags,