Skip to content

[Feature Request] Different exit code for fatal error #73

@ybiquitous

Description

@ybiquitous

Hello,

I'm in trouble because I cannot distinguish a fatal error from a rule violation by the exit code. 😰

rescue => exn
stderr.puts Rainbow("Fatal error:").red
stderr.puts exn.inspect
stderr.puts exn.backtrace.map {|x| " " + x }.join("\n")
1

querly/lib/querly/cli.rb

Lines 59 to 61 in 6bfde87

rescue => exn
formatter.fatal_error exn
exit 1

Without parsing the output (STDOUT and STDERR), is there a way to distinguish them?
If no way, perhaps this may be a breaking change, would it be a good idea to add a new exit code (e.g. 1) for a fatal error?

I would be happy if you could consider this idea.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions