Merge pull request #150 from eparis/help-not-available

Do not count "help" as "Available"
This commit is contained in:
Eric Paris 2015-09-11 17:46:27 -05:00
commit 0d9b07baf9
1 changed files with 4 additions and 0 deletions

View File

@ -857,6 +857,10 @@ func (c *Command) IsAvailableCommand() bool {
return false
}
if c.HasParent() && c.Parent().helpCommand == c {
return false
}
if c.Runnable() || c.HasAvailableSubCommands() {
return true
}