forked from mirror/cobra
fixes verbose tests by checking if the first arg belongs to cobra
This commit is contained in:
parent
0e4c02d9cb
commit
62e859a9ed
|
@ -618,7 +618,7 @@ func (c *Command) Execute() (err error) {
|
||||||
|
|
||||||
var args []string
|
var args []string
|
||||||
|
|
||||||
if len(c.args) == 0 {
|
if len(c.args) == 0 && os.Args[0] == c.Name() {
|
||||||
args = os.Args[1:]
|
args = os.Args[1:]
|
||||||
} else {
|
} else {
|
||||||
args = c.args
|
args = c.args
|
||||||
|
|
Loading…
Reference in New Issue