Commit bd93f66
committed
Fix 2257 - Remove incorrect flag check
If the argument passed with a command isn't a sub command, there are two
checks performed - check if the command has a default command, and check
if the argument passed is a flag.
In the case that the default command doesn't exist, and the argument
passed is the name of a flag, the sub command resolves to nil, which it
was previously as well. Implying the check for the flag name doesn't
have affect the sub command resolution.
Since a default command doesn't exist, the cmd.parsedArgs list ends up
with an empty argument as its zeroth element. This commit removes the
flag name check1 parent a107ee4 commit bd93f66
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
276 | | - | |
| 275 | + | |
277 | 276 | | |
278 | 277 | | |
279 | 278 | | |
| |||
0 commit comments