You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched issues to ensure it has not already been reported
Cake runner
Cake Frosting
Cake version
4.0.0
Operating system
Windows
Operating system architecture
64-Bit
CI Server
No response
What are you seeing?
If I specify the target as --target some-target in the command-line, I get just some-target for the target argument.
If I specify the target as --Target some-target in the command-line, I get some-target and Default for the Target argument.
This causes context.Argument("target", "Default") to return different values depending on having specified target or Target.
What is expected?
I expected both options the have the same behavior, since the arguments dictionary uses a ordinal ignore case comparer.
Steps to Reproduce
With this simple program:
new CakeHost().Run(args);[TaskName("Default")]publicclassDefault:FrostingTask<ICakeContext>{publicoverridevoidRun(ICakeContextcontext){
context.Log.Information($"target: {string.Join(',', context.Arguments.GetArguments("target"))}");base.Run(context);}}[TaskName("some target")]publicclassSomeTarget:FrostingTask<ICakeContext>{publicoverridevoidRun(ICakeContextcontext){
context.Log.Information($"target: {string.Join(',', context.Arguments.GetArguments("target"))}");base.Run(context);}}
you get different results depending how you invoke it:
dotnet run ... -- --target "some target"
========================================
some target
========================================
target: some target
dotnet run ... -- --Target "some target"
========================================
Default
========================================
target: some target,Default
Output log
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Cake runner
Cake Frosting
Cake version
4.0.0
Operating system
Windows
Operating system architecture
64-Bit
CI Server
No response
What are you seeing?
If I specify the target as
--target some-target
in the command-line, I get justsome-target
for thetarget
argument.If I specify the target as
--Target some-target
in the command-line, I getsome-target
andDefault
for theTarget
argument.This causes
context.Argument("target", "Default")
to return different values depending on having specifiedtarget
orTarget
.What is expected?
I expected both options the have the same behavior, since the arguments dictionary uses a ordinal ignore case comparer.
Steps to Reproduce
With this simple program:
you get different results depending how you invoke it:
Output log
No response
The text was updated successfully, but these errors were encountered: