lib/spoom/cli/run.rb in spoom-1.1.5 vs lib/spoom/cli/run.rb in spoom-1.1.6

- old
+ new

@@ -33,16 +33,31 @@ format = options[:format] count = options[:count] sorbet = options[:sorbet] unless limit || code || sort - output, status = T.unsafe(Spoom::Sorbet).srb_tc(*arg, path: path, capture_err: false, sorbet_bin: sorbet) + output, status, exit_code = T.unsafe(Spoom::Sorbet).srb_tc( + *arg, + path: path, + capture_err: false, + sorbet_bin: sorbet + ) + + check_sorbet_segfault(exit_code) say_error(output, status: nil, nl: false) exit(status) end - output, status = T.unsafe(Spoom::Sorbet).srb_tc(*arg, path: path, capture_err: true, sorbet_bin: sorbet) + output, status, exit_code = T.unsafe(Spoom::Sorbet).srb_tc( + *arg, + path: path, + capture_err: true, + sorbet_bin: sorbet + ) + + check_sorbet_segfault(exit_code) + if status say_error(output, status: nil, nl: false) exit(0) end @@ -97,10 +112,10 @@ message.chars.each do |c| if c == '`' cyan = !cyan next end - word << (cyan ? c.cyan : c.red) + word << (cyan ? cyan(c) : red(c)) end word.string end end end