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

jsonlint --version returns nonzero exit status, indicating failure #122

Open
evolutics opened this issue Nov 17, 2019 · 3 comments
Open

Comments

@evolutics
Copy link

For JSON Lint 1.6.3, running jsonlint --version returns exit code 1, which is commonly used to indicate failure.

Instead, I'd expected jsonlint --version to return exit code 0, indicating success, as this seems normal usage of the utility to me. This is also recommended by the GNU Coding Standards on --version in general.

Instructions to reproduce this:

docker run -it --rm alpine:3.10.3
/ # apk add npm=10.16.3-r0
/ # npm install jsonlint@1.6.3 -g
/ # jsonlint --version
1.6.3
/ # echo "$?"
1
@stefancrain
Copy link

Temporary workaround : use jsonlint --version || true

@prantlf
Copy link

prantlf commented Jan 1, 2020

My fork (@prantlf/jsonlint) exits with zero in this case. More of a side-effect after switching to commander as command-line argument parser, which behaves like that by default...

@Friend-LGA
Copy link

3 years later, still version 1.6.3 and still it's failing on jsonlint --version
Maybe it's time to bump up the version?

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

4 participants