mirror of
https://github.com/spf13/cobra
synced 2025-05-06 05:17:21 +00:00
Remove redundant else
This commit is contained in:
parent
7547e83b2d
commit
492264d440
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue