-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Report better error when single-quotes in program #538
Comments
@dandv The problem is the shell, not jq. The problem here is that the shell doesn't handle single quotes like a Unix shell: it passes the single quotes to jq, and since single quotes are not a normal part of a jq program, you get an error. I think we could add some rules to the parser to produce an error message that might help the user understand. Anyways, |
If you don't mind I changed the issue title as I want to use this as the vehicle for the improvement at hand. |
And, actually, I think we should probably always print a message about shell quoting when the error involves |
And you're right, we could probably use a larger section on the shells. |
The docs do have a note about invoking jq on Windows, right in the "Invoking jq" section. The "Note:" is not loud enough though :( |
Thanks @nicowilliams, omitting the quotes worked. I should've tried double quotes too, which also works. |
I've spend over 10 minutes trying to simply pretty-print a json file on Windows. This really shouldn't be that hard, but it is because classic conventions are violated:
both fail with a cryptic error message,
See #392 (comment) for details.
The text was updated successfully, but these errors were encountered: