yaml w -i task-output/manifest.yml 'env.JAVA_OPTS' '-Djava.security.egd=file:///dev/urandom'
Usage:
yaml write [yaml_file] [path] [value] [flags]
Aliases:
write, w
Examples:
yaml write things.yaml a.b.c cat
yaml write --inplace things.yaml a.b.c cat
yaml w -i things.yaml a.b.c cat
yaml w --script update_script.yaml things.yaml
yaml w -i -s update_script.yaml things.yaml
Flags:
-i, --inplace[=false]: update the yaml file inplace
-s, --script="": yaml script for updating yaml
Global Flags:
-J, --fromjson[=false]: input as json
-j, --tojson[=false]: output as json
-t, --trim[=true]: trim yaml output
-v, --verbose[=false]: verbose mode
Error: unknown shorthand flag: 'D' in -Djava.security.egd=file:///dev/urandom
Ooh nice, played around with it a little, I was able to get it working by using both single and double quotes.
/yaml w sample.json a.b '"-Djava.security.egd=file:///dev/urandom"'
Not pretty but it works. I'll update the doco too for when someone else encounters this :)
Just realised that this won't work for negative numbers as it will treat the value as a string...
Ok worked it out, you need to use the flag terminator (--) so:
yaml w sample.json -- a.b -Djava.security.egd=file:///dev/urandom
this also works with numbers
yaml w sample.json -- a.b -3
Most helpful comment
Ok worked it out, you need to use the flag terminator (--) so:
this also works with numbers