kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.53k stars 81 forks source link

Test fails with jq-1.7 #172

Closed miallo closed 10 months ago

miallo commented 10 months ago

If I understand https://github.com/kislyuk/yq/blob/b82e1b95f2fa81cca6f050e06bca81768b178744/test/test.py#L139 correctly, it is equivalent to the following:

> 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...

I think this is the PR that changed the jq behaviour: https://github.com/jqlang/jq/pull/2658

kislyuk commented 10 months ago

Thank you for reporting, fixed in v3.2.3