Do not cound "help" as "Available"

This commit is contained in:
Eric Paris 2015-09-11 18:18:36 -04:00
parent 42498ec777
commit 24b4b01ffa

View file

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