"--version option cannot be combined with other arguments." is not displayed when "--help" is also specified
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu với việc tái hiện trong Program.cs và chạy các tổ hợp lệnh --help/--version được liệt kê để xác nhận đầu ra khác nhau. Sau đó, theo dõi cách CLI xử lý các đối số help và version; hoàn tất khi lỗi dự kiến "--version option cannot be combined with other arguments." được hiển thị khi cung cấp cả hai tùy chọn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi.
Thank you for System.CommandLine.
The error message "--version option cannot be combined with other arguments." is not displayed when "--help" is also specified on the command line.
Steps to reproduce:
- Build console app with Program.cs:
internal class Program
{
static async Task<int> Main(string[] args)
{
RootCommand rootCommand = new RootCommand();
var option = new Option<bool>("--option1");
rootCommand.Add(option);
rootCommand.Handler = CommandHandler.Create(() =>
{
Console.WriteLine("Hello, World!");
});
return await rootCommand.InvokeAsync(args);
}
}
-
Run
ConsoleApp1.exe --option1 --version
Notice the error--version option cannot be combined with other arguments.
This is expected behavior. -
Run
ConsoleApp10.exe --help --version
Notice the error is not displayed.
Only the version is displayed.
This is unexpected behavior; I expected the error--version option cannot be combined with other arguments.. -
Run
ConsoleApp10.exe --option1 --help --version
Notice the error is not displayed.
Only the version is displayed.
This is unexpected behavior; I expected the error--version option cannot be combined with other arguments..
System.CommandLine 2.0.0-beta4.22272.1
Thank you.
- Ngôn ngữ chính
- C#
- Star
- 3.7k
- Fork
- 434
- Merge trung bình
- 6 giờ 27 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/command-line-api
-
German localization is incompleteCó thể đã có người làm @b-v-d-e-v đã nhận 19 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/command-line-api#2852 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translatedCó thể đã có người làm @JPBlanc đã nhận 117 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/command-line-api#2822 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/command-line-api#2792 · 2 bình luận · 16 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`Argument.Arity` modify internal state on first get access.Có thể đã có người làm @zjdangge đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/command-line-api#2704 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GetCompletions should check exit code of invoked applicationCó thể đã có người làm @baradgur đã nhận 1288 ngày trước. Đang mởArea-Completions bug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dotnet/command-line-api#2137 · 1 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dotnet/command-line-api
Issue tương tự
-
Format request: .wbpzĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
KnifeLemon/Filee#294 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
gavin-wolfe/wolfden#104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Still libmicrohttpd dependency is not removed properly from External-Dependency-Info.txt fileCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởtype/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:framework
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
nunit/docs#1262 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
validate_environment_path strips executable extensions from directory names, not only from the end of the pathCó thể đã có người làm @auraseb đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Unity-Technologies/ml-agents#6332 ·