Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails with jq-1.7 #172

Closed
miallo opened this issue Sep 8, 2023 · 1 comment
Closed

Test fails with jq-1.7 #172

miallo opened this issue Sep 8, 2023 · 1 comment

Comments

@miallo
Copy link

miallo commented Sep 8, 2023

If I understand

yq/test/test.py

Line 139 in b82e1b9

self.assertEqual(self.run_yq("{}", [".", "--jsonargs", "a", "b"]), "")

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: jqlang/jq#2658

@kislyuk
Copy link
Owner

kislyuk commented Sep 9, 2023

Thank you for reporting, fixed in v3.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants