dotnet / dotnet/command-line-api
If an optional positional argument is not specified it may incorrectly be filled with another argument
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
Can put together a repro case if this bug is not obvious (and im not making a mistake) but it seems pretty easy to cause.
Given the args array to InvokeAsync of:

It assigns the value that is properly assigned to the Program argument also to the not-specified positional arg zArgs

Help output to better illustrate:
```
Usage:
TestApp Monitor [] [options]
Arguments:
File or folder
Program path
Arg string to pass
Options:
--Debug turn on debug mode
```
If a value is given for that it does parse correctly:

Running: 2.0.0-beta4.22272.1
Contributor guide
Assessment
This issue has not been assessed yet.