Adds additional handling around ScriptArgs to be more flexible #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is more of a request for comments, but I think it is a step in the right direction. Currently passing in parameters to a cake script from the powershell bootstrapper isn't consistent, plus kind of weird especially with handling filenames.
Let's take this "build" script
With the current implementation to run this script with diagnostic verbosity you must run to get this to work (note no equal after verbosity but required for the others)
Additionally, if you make any mistake it'll blindly pass those args in cake giving some less than helpful errors because cake expects things differently than the bootstrapper. Some of these error messages actually point you in the wrong direction (see the verbosity help that is outputted)
you get this output
Or if you don't properly quote the file name
you get this output
This change allows you to run
Looks more like powershell and still sends things into cake.exe as expected.
File.txt
will be properly quoted andsomeBool
will be sent assomeBool=true
. Not sure if I've caught all the edge cases here especially around what values need to be quoted, but I wanted to throw this out and see what you all think. I'll be away on holiday until the 1st but hopefully I'll be able to check in and answer any questions or get tweaks implemented if this is something valuable.