Skip to content

Commit

Permalink
Fix Bundler default bindir on Windows (#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored Jan 6, 2025
1 parent e0972b4 commit 6baebf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exe/ruby-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if ENV["BUNDLE_GEMFILE"].nil?
end

bundler_path = File.join(Gem.default_bindir, "bundle")
base_command = (File.exist?(bundler_path) ? "#{Gem.ruby} #{bundler_path}" : "bundle").dup
base_command = (!Gem.win_platform? && File.exist?(bundler_path) ? "#{Gem.ruby} #{bundler_path}" : "bundle").dup

if env["BUNDLER_VERSION"]
base_command << " _#{env["BUNDLER_VERSION"]}_"
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lsp/setup_bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def run_bundle_install_through_command(env)
# When not updating, we run `(bundle check || bundle install)`
# When updating, we run `((bundle check && bundle update ruby-lsp debug) || bundle install)`
bundler_path = File.join(Gem.default_bindir, "bundle")
base_command = (File.exist?(bundler_path) ? "#{Gem.ruby} #{bundler_path}" : "bundle").dup
base_command = (!Gem.win_platform? && File.exist?(bundler_path) ? "#{Gem.ruby} #{bundler_path}" : "bundle").dup

if env["BUNDLER_VERSION"]
base_command << " _#{env["BUNDLER_VERSION"]}_"
Expand Down

0 comments on commit 6baebf0

Please sign in to comment.