SharpeRAD / Cake.Powershell

Powershell addin for Cake
http://cakebuild.net
MIT License
83 stars 36 forks source link

Problems with dollar ($) in arguments #3

Closed jclin closed 8 years ago

jclin commented 8 years ago

Heya, just wanted to give a heads up on an issue we encountered. We had an argument that contained a $. When wrapped in a QuotedArgument, Powershell sees the double-quoted string and tries to parse the $, and the characters following it, as a variable so the resulting string is incorrect.

What do you think of using LiteralString in place of QuotedArgument? Since it's a single quoted string, Powershell would treat it as a string-literal, and that issue would be avoided.

SharpeRAD commented 8 years ago

I can see the need for a LiteralString argument but I want to be consistent with Cakes existing IProcessArgument. So instead of replacing QuotedArgument, how about submitting a PR that adds LiteralStringArgument and the necessary extension methods to ProcessArgumentListExtensions.

Sound like a good compromise?

jclin commented 8 years ago

Sounds good, I'll put up a PR in a bit.

EDIT: PR is up: https://github.com/SharpeRAD/Cake.Powershell/pull/4

SharpeRAD commented 8 years ago

Will be live in v0.2.4 in a few mins :smile: