mirror of
https://github.com/spf13/cobra
synced 2025-05-05 12:57:22 +00:00
Merge ff4a381d80
into 8b2293c741
This commit is contained in:
commit
cf78e6361a
1 changed files with 1 additions and 1 deletions
|
@ -614,7 +614,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…
Add table
Reference in a new issue