From 62e859a9edc559b8050e7dced9429ff061b2eb49 Mon Sep 17 00:00:00 2001 From: Austin Riendeau Date: Sat, 7 Nov 2015 11:42:13 -0700 Subject: [PATCH] fixes verbose tests by checking if the first arg belongs to cobra --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index c1873ec7..558fed45 100644 --- a/command.go +++ b/command.go @@ -618,7 +618,7 @@ func (c *Command) Execute() (err error) { var args []string - if len(c.args) == 0 { + if len(c.args) == 0 && os.Args[0] == c.Name() { args = os.Args[1:] } else { args = c.args