-
Notifications
You must be signed in to change notification settings - Fork 1.3k
dotnet run swallows -bl arguments even if they follow double dash (--) #54715
Open
Description
Describe the bug
dotnet run -- -bl should run an app and pass -bl to it as command-line argument. Instead dotnet run itself uses the -bl argument.
Steps to reproduce
Create a simple command-line app that can echo its arguments, for example:
Console.WriteLine($"args({args.Length}):{string.Join(";", args)}");
dotnet run -- --no-build->args(1):--no-buildOKdotnet run -- -bl->args(0):WRONG
Expected behavior
-bl should be passed to the app since it's after --.
Actual behavior
-bl is consumed by dotnet run CLI.
Is this a regression?
No.
Are there any workarounds?
No.
dotnet --info output
.NET 10.0.300IDE version
No response
Other details
No response
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for Bug.