commandlineparser / commandlineparser/commandline
AutoHelp and AutoVersion don't work when the arguments contain executable name
- Ngôn ngữ chính
- C#
- Star
- 4.8k
- Fork
- 478
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
`Environment.GetCommandLineArgs()` returns arguments including the program path (but not including `dotnet`):
```cs
{ "/Users/usrsse2/project/CLI/bin/Debug/net6.0/CLI.dll", "--version" }
```
When I pass it into `ParseArguments`, it correctly parses all options and values defined in my T, but for `--help` and `--version` returns `UnknownOptionError` instead of the expected `HelpRequestedError` and `VersionRequestedError`. When I pass `Environment.GetCommandLineArgs().Skip(1)`, it works correctly.
This is probably related to #600, because `--help` is recognized only if it's the first option.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.