Skip to content

Include name of argument when an argument is missing#2747

Open
samblackburn wants to merge 3 commits intodotnet:mainfrom
samblackburn:missing-argument
Open

Include name of argument when an argument is missing#2747
samblackburn wants to merge 3 commits intodotnet:mainfrom
samblackburn:missing-argument

Conversation

@samblackburn
Copy link

Closes #1074

Reimplementation of #1993 which went quiet in 2023 and now has a ton of merge conflicts.

AI disclaimer: I made this PR while playing with Claude Code.

While the Latin languages look correct to me, I haven't verified the other translations.

@samblackburn
Copy link
Author

@dotnet-policy-service agree company="Redgate Software Ltd"

@samblackburn samblackburn marked this pull request as ready for review January 7, 2026 14:38
internal static string RequiredArgumentMissing(ArgumentResult argumentResult) =>
argumentResult.Parent is CommandResult commandResult
? GetResourceString(Properties.Resources.CommandRequiredArgumentMissing, commandResult.IdentifierToken.Value)
? GetResourceString(Properties.Resources.CommandRequiredArgumentMissing, argumentResult.Argument.Name, commandResult.IdentifierToken.Value)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be HelpName rather than Name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When missing add name of argument for command to error message

3 participants