lib/spoom/cli/run.rb in spoom-1.1.15 vs lib/spoom/cli/run.rb in spoom-1.1.16
- old
+ new
@@ -41,11 +41,10 @@
path: path,
capture_err: false,
sorbet_bin: sorbet,
)
- check_sorbet_segfault(result.code)
say_error(result.err, status: nil, nl: false)
exit(result.status)
end
error_url_base = Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE
@@ -55,12 +54,10 @@
path: path,
capture_err: true,
sorbet_bin: sorbet,
)
- check_sorbet_segfault(result.exit_code)
-
if result.status
say_error(result.err, status: nil, nl: false)
exit(0)
end
@@ -107,9 +104,23 @@
say_error("Errors: #{errors.size} shown, #{errors_count} total", status: nil)
end
end
exit(1)
+ rescue Spoom::Sorbet::Error::Segfault => error
+ say_error(<<~ERR, status: nil)
+ #{red("!!! Sorbet exited with code #{error.result.exit_code} - SEGFAULT !!!")}
+
+ This is most likely related to a bug in Sorbet.
+ ERR
+
+ exit(error.result.exit_code)
+ rescue Spoom::Sorbet::Error::Killed => error
+ say_error(<<~ERR, status: nil)
+ #{red("!!! Sorbet exited with code #{error.result.exit_code} - KILLED !!!")}
+ ERR
+
+ exit(error.result.exit_code)
end
no_commands do
def format_error(error, format)
line = format