Open
Description
There are issues with escaping evaluation strings on Windows. see #747 #777 et al.
Add a yq.ps1
file
Param(
[string]$command,
[string]$yamlFile
)
$escCommand = $command -replace '"','\"'
$evalArgs = @("eval", "$escCommand", $yamlFile)
Write-Output ".\yq.exe" $evalArgs
& ".\yq.exe" $evalArgs
alternatives
Update the documentation to show how to escape/replace '"' with '"'.
yq e -n '.someNew="content"'.replace('"','\"' )
yq e -n '{"wrap": .}' .replace('"','\"' ) name.yaml
I have not looked into what a similar *.bat or *.cmd file might look like.