Skip to content

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

@Gerrit-K

Description

@Gerrit-K

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 "$@"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting ReleaseIssue is fixed, but not available in a published releaseBugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions