mirror of https://github.com/spf13/cobra.git
Do not cound "help" as "Available"
This commit is contained in:
parent
42498ec777
commit
24b4b01ffa
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue