mirror of
https://github.com/spf13/cobra
synced 2024-11-16 10:47:09 +00:00
changes to contains rather than equality
This commit is contained in:
parent
62e859a9ed
commit
36ad142ac1
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 && os.Args[0] == c.Name() {
|
||||
if len(c.args) == 0 && strings.Contains(os.Args[0], c.Name()) {
|
||||
args = os.Args[1:]
|
||||
} else {
|
||||
args = c.args
|
||||
|
|
Loading…
Reference in a new issue