8000 stop using System.CommandLine types that aren't public anymore by adamsitnik · Pull Request #49181 · dotnet/sdk · GitHub
[go: up one dir, main page]

Skip to content

stop using System.CommandLine types that aren't public anymore #49181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't customize a description of a command used in one place, just se…
…t the description to desired text
  • Loading branch information
adamsitnik committed May 28, 2025
commit 3897299ae249fafccbc11cb7e906bc7a627a823f
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static Command GetCommand()

private static Command ConstructCommand()
{
var command = new Command("version", CliCommandStrings.PrintSetVersionsDescription);
var command = new Command("version", CliStrings.ShortWorkloadSearchVersionDescription);
command.Arguments.Add(WorkloadVersionArgument);
command.Options.Add(FormatOption);
command.Options.Add(TakeOption);
Expand Down
9 changes: 1 addition & 8 deletions src/Cli/dotnet/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ internal static int ExceptionHandler(Exception exception, ParseResult parseResul

return 1;
}

internal class DotnetHelpBuilder : HelpBuilder
{
private DotnetHelpBuilder(int maxWidth = int.MaxValue) : base(maxWidth) { }
Expand All @@ -273,16 +273,9 @@ private DotnetHelpBuilder(int maxWidth = int.MaxValue) : base(maxWidth) { }

DotnetHelpBuilder dotnetHelpBuilder = new(windowWidth);

SetHelpCustomizations(dotnetHelpBuilder);

return dotnetHelpBuilder;
});

private static void SetHelpCustomizations(HelpBuilder builder)
{
builder.CustomizeSymbol(WorkloadSearchVersionsCommandParser.GetCommand(), secondColumnText: CliStrings.ShortWorkloadSearchVersionDescription);
}

public static void additionalOption(HelpContext context)
{
List<TwoColumnHelpRow> options = [];
Expand Down
Loading
0