cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.89k stars 724 forks source link

Add defaultValue param to the GetArgument helper #4237

Closed harry-cpp closed 11 months ago

harry-cpp commented 11 months ago

This PR adds ability to specify the desired default value of an argument when retrieving it with the helper function with cake frosting, ie:

ArtifactsDir = context.Arguments.GetArgument("artifactsDir", "artifacts");
harry-cpp commented 11 months ago

@microsoft-github-policy-service agree

harry-cpp commented 11 months ago

I just noticed that context.Arguments is both a property and a method, pardon the PR this change is redundant as the method version of it covers both reading the argument and getting the default value 😅