Closed schra closed 3 years ago
yq is a wrapper for jq. Options such as slurpfile are passed unmodified to jq, so the data they reference must be interpretable by jq. You can get around this by converting the input to slurpfile using yq as well:
yq . t.yml --slurpfile t <(yq . t.yml)
This actually did not work until today because of an unrelated problem (yq used the default Python 3 behavior of closing all fds except 0, 1 and 2 when spawning subprocesses). I fixed this issue and released v2.12.1, so please install that before using the recipe above.
I would expect this to work:
It works with jq:
More information: