lib/spoom/cli/run.rb in spoom-1.1.16 vs lib/spoom/cli/run.rb in spoom-1.2.0

- old
+ new

@@ -22,37 +22,33 @@ option :uniq, type: :boolean, aliases: :u, desc: "Remove duplicated lines" option :count, type: :boolean, default: true, desc: "Show errors count" option :sorbet, type: :string, desc: "Path to custom Sorbet bin" option :sorbet_options, type: :string, default: "", desc: "Pass options to Sorbet" def tc(*paths_to_select) - in_sorbet_project! - - path = exec_path + context = context_requiring_sorbet! limit = options[:limit] sort = options[:sort] code = options[:code] uniq = options[:uniq] format = options[:format] count = options[:count] sorbet = options[:sorbet] unless limit || code || sort - result = T.unsafe(Spoom::Sorbet).srb_tc( + result = T.unsafe(context).srb_tc( *options[:sorbet_options].split(" "), - path: path, capture_err: false, sorbet_bin: sorbet, ) say_error(result.err, status: nil, nl: false) exit(result.status) end error_url_base = Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE - result = T.unsafe(Spoom::Sorbet).srb_tc( + result = T.unsafe(context).srb_tc( *options[:sorbet_options].split(" "), "--error-url-base=#{error_url_base}", - path: path, capture_err: true, sorbet_bin: sorbet, ) if result.status