mirror of
https://github.com/spf13/cobra
synced 2024-12-27 14:57:06 +00:00
remove help command before adding it (#399)
This fixes an issue where each Execute call grows the number of times `help` appears in the help command by 1.
This commit is contained in:
parent
16c014f1a1
commit
7be4beda01
1 changed files with 1 additions and 0 deletions
|
@ -788,6 +788,7 @@ func (c *Command) initHelpCmd() {
|
|||
},
|
||||
}
|
||||
}
|
||||
c.RemoveCommand(c.helpCommand)
|
||||
c.AddCommand(c.helpCommand)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue