mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
fixes verbose tests by checking if the first arg belongs to cobra
This commit is contained in:
parent
0e4c02d9cb
commit
62e859a9ed
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue