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 |
|
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.
Hello,
I'm in trouble because I cannot distinguish a fatal error from a rule violation by the exit code. 😰
querly/lib/querly/cli/test.rb
Lines 36 to 41 in 6bfde87
querly/lib/querly/cli.rb
Lines 59 to 61 in 6bfde87
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.