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

No non-zero exit code in case of parsing errors #71

Closed
Gerrit-K opened this issue Mar 11, 2022 · 1 comment
Closed

No non-zero exit code in case of parsing errors #71

Gerrit-K opened this issue Mar 11, 2022 · 1 comment
Labels
Awaiting Release Issue is fixed, but not available in a published release Bug Something isn't working

Comments

@Gerrit-K
Copy link

Description

jless currently returns 0 (success) as an exit code, even if the command failed (e.g. if the input wasn't valid JSON). To reproduce:

jless - <<<"This is no JSON"; echo $?

will result the following output:

Unable to parse input: "Parse error"
0

Impact / use-case

Having a non-zero exit code increases interoperability and allows for fallbacks in scripts, e.g. jless "$@" || less "$@"

@PaulJuliusMartinez PaulJuliusMartinez added the Bug Something isn't working label Jun 9, 2022
@PaulJuliusMartinez PaulJuliusMartinez added the Awaiting Release Issue is fixed, but not available in a published release label Jul 9, 2023
@PaulJuliusMartinez
Copy link
Owner

This has been implemented in v0.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Release Issue is fixed, but not available in a published release Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants