From 5e9ccc4d642b8c2b2f3c270828f04f9d38f1db33 Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 11 Jan 2019 00:03:21 +0500 Subject: [PATCH] remove redundant 'else' (#806) --- command.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/command.go b/command.go index 768f05d3..b257f91b 100644 --- a/command.go +++ b/command.go @@ -817,13 +817,11 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { // overriding c.InitDefaultHelpCmd() - var args []string + args := c.args // Workaround FAIL with "go test -v" or "cobra.test -test.v", see #155 if c.args == nil && filepath.Base(os.Args[0]) != "cobra.test" { args = os.Args[1:] - } else { - args = c.args } var flags []string