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:
Tamir Duberstein 2017-03-14 13:12:53 -04:00 committed by Eric Paris
parent 16c014f1a1
commit 7be4beda01

View file

@ -788,6 +788,7 @@ func (c *Command) initHelpCmd() {
}, },
} }
} }
c.RemoveCommand(c.helpCommand)
c.AddCommand(c.helpCommand) c.AddCommand(c.helpCommand)
} }