> jq --version
jq-1.6
> echo "" | jq . --jsonargs a b
> echo $?
0
but this is an error with the new jq version (homebrew version on MacOS):
> jq --version
jq-1.7
> echo "" | jq . --jsonargs a b
jq: invalid JSON text passed to --jsonargs
Use jq --help for help with command-line options,
or see the jq manpage, or online docs at https://jqlang.github.io/jq
I did not see something specific at first glance in the release notes, but the behaviour definitely has changed.
I have to confess that I don't fully understand --jsonargs (or this test suite), so I can't really help here...
If I understand https://github.com/kislyuk/yq/blob/b82e1b95f2fa81cca6f050e06bca81768b178744/test/test.py#L139 correctly, it is equivalent to the following:
but this is an error with the new jq version (homebrew version on MacOS):
I did not see something specific at first glance in the release notes, but the behaviour definitely has changed. I have to confess that I don't fully understand
--jsonargs
(or this test suite), so I can't really help here...I think this is the PR that changed the jq behaviour: https://github.com/jqlang/jq/pull/2658