From 7be4beda01ec05d0b93d80b3facd2b6f44080d94 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Tue, 14 Mar 2017 13:12:53 -0400 Subject: [PATCH] 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. --- command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command.go b/command.go index ae3930d..664bf5a 100644 --- a/command.go +++ b/command.go @@ -788,6 +788,7 @@ func (c *Command) initHelpCmd() { }, } } + c.RemoveCommand(c.helpCommand) c.AddCommand(c.helpCommand) }