Skip to content

Commit

Permalink
Only retry building composed bundle if there's a custom Gemfile (#2755)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored Oct 22, 2024
1 parent 2036ed4 commit 734e872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ruby_lsp/setup_bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def run_bundle_install(bundle_gemfile = @gemfile)
# Try to run the bundle install or update command. If that fails, it normally means that the custom lockfile is in
# a bad state that no longer reflects the top level one. In that case, we can remove the whole directory, try
# another time and give up if it fails again
if !system(env, command) && !@retry && @custom_dir.exist?
if !system(env, command) && !@retry && @custom_gemfile.exist?
@retry = true
@custom_dir.rmtree
$stderr.puts("Ruby LSP> Running bundle install failed. Trying to re-generate the custom bundle from scratch")
Expand Down

0 comments on commit 734e872

Please sign in to comment.