lib/spoom/cli/run.rb in spoom-1.1.13 vs lib/spoom/cli/run.rb in spoom-1.1.14
- old
+ new
@@ -62,9 +62,16 @@
if result.status
say_error(result.err, status: nil, nl: false)
exit(0)
end
+ unless result.exit_code == 100
+ # Sorbet will return exit code 100 if there are type checking errors.
+ # If Sorbet returned something else, it means it didn't terminate normally.
+ say_error(result.err, status: nil, nl: false)
+ exit(1)
+ end
+
errors = Spoom::Sorbet::Errors::Parser.parse_string(result.err, error_url_base: error_url_base)
errors_count = errors.size
errors = errors.select { |e| e.code == code } if code