Commit 852060e
committed
Fix issue: 2257 Next arg flag name, no default cmd
If the next argument matches a flag name, and there is no default
command, a spurious empty string gets inserted before the flag name.
Existing code that expects the flag name in element 0 fails because it
is now in element 1 with an empty string in element 0.
When there is no default command and an empty string is detected in
element 0 (i.e. `cmd.parsedArgs.First()`), change `cmd.parsedArgs` to
omit the first empty element.1 parent fd14621 commit 852060e
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
| |||
0 commit comments