puppetlabs / bolt-vanagon

Apache License 2.0
2 stars 30 forks source link

(BOLT-1128) Fix JSON in PowerShell CLI #78

Closed RandomNoun7 closed 5 years ago

RandomNoun7 commented 5 years ago

Prior to this change, passing JSON as a parameter value to Bolt was a bit difficult and prone to error because of the formatting requirements involved with getting a properly escaped JSON string into Ruby.

This change finds any double quote characters in a string argument and properly escapes them before passing them as arguments to Bolt. This should help not only with passing JSON, but in any other situation where a set of quotes needs to be faithfully represented to Bolt when coming from a PowerShell CLI environment.