lib/spoom/sorbet/lsp.rb in spoom-1.0.4 vs lib/spoom/sorbet/lsp.rb in spoom-1.0.5

- old
+ new

@@ -9,13 +9,15 @@ require_relative 'lsp/errors' module Spoom module LSP class Client - def initialize(sorbet_cmd, *sorbet_args) + def initialize(sorbet_cmd, *sorbet_args, path: ".") @id = 0 Bundler.with_clean_env do - @in, @out, @err, @status = Open3.popen3([sorbet_cmd, *sorbet_args].join(" ")) + opts = {} + opts[:chdir] = path + @in, @out, @err, @status = Open3.popen3([sorbet_cmd, *sorbet_args].join(" "), opts) end end def next_id @id += 1