yq icon indicating copy to clipboard operation
yq copied to clipboard

xq: Bug with --slurpfile?

Open PenelopeFudd opened this issue 4 years ago • 0 comments

Hi;

This example generates half xml/half internal-format output:

cat << 'EOF' > a.json
[  { "copy": { } } ]
EOF

xq -x --xml-root=a --slurpfile a a.json '$a' <<< '<a/>'

<a>[OrderedDict([('copy', OrderedDict())])]</a>

I'm guessing --slurpfile a a.json has a bug, because replacing it with --argjson a "$(cat a.json)" works as expected.

Thanks for the fine program! :-)

PenelopeFudd avatar Sep 08 '21 06:09 PenelopeFudd