Merge persistent flags before checking for a help flag.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
@ -684,6 +684,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
||||
}
|
||||
|
||||
func (c *Command) initHelpFlag() {
|
||||
c.mergePersistentFlags()
|
||||
if c.Flags().Lookup("help") == nil {
|
||||
c.Flags().BoolP("help", "h", false, "help for "+c.Name())
|
||||
}
|
||||
|
Reference in New Issue
Block a user