"--version option cannot be combined with other arguments." is not displayed when "--help" is also specified
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Program.cs の再現から始め、一覧にある --help/--version コマンドの組み合わせを実行して、出力の違いを確認します。次に、CLI が help と version の引数をどのように処理するかを追跡します。両方のオプションを指定したときに、期待されるエラー "--version option cannot be combined with other arguments." が表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C#
- スター
- 3.7k
- フォーク
- 434
- 平均マージ
- 6時間 27分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/command-line-api のほかの issue
-
German localization is incomplete対応中かも @b-v-d-e-v が 19 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dotnet/command-line-api#2852 ·
メンテナーはふだん 1 日以内に返信
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translated対応中かも @JPBlanc が 117 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dotnet/command-line-api#2822 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dotnet/command-line-api#2792 · コメント 2 件 · リアクション 16 件 ·
メンテナーはふだん 1 日以内に返信
-
`Argument.Arity` modify internal state on first get access.対応中かも @zjdangge が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dotnet/command-line-api#2704 ·
メンテナーはふだん 1 日以内に返信
-
GetCompletions should check exit code of invoked application対応中かも @baradgur が 1288 日前に担当しました。 オープンArea-Completions bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dotnet/command-line-api#2137 · コメント 1 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
dotnet/command-line-api の issue をすべて見る
似ている issue
-
bug ux
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CodeForFire/lagebuch#714 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
dimitar-radenkov/Pointframe#294 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
Okabintaro/SubmersedVR#253 ·
-
S: Untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
メンテナーはふだん 2 日以内に返信
-
maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hyjinx-emu/Hyjinx#398 ·
メンテナーはふだん 1 日以内に返信