-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use original Bundler binstub from RubyGems to avoid version argument …
…issues (#2987) ### Motivation Closes #2862 and #2731 (comment) Clearly, adding the Bundler version to the command causes trouble for people using binstubs in certain configurations. I think I found a way to continue specifying the version, which guarantees that RubyGems will eagerly activate the right specification, while at the same time avoiding those issues. ### Implementation The idea is to invoke the original Bundler binstub generated by RubyGems directly. That way, even if there's a custom binstub, we avoid invoking it and use the default one (which accepts the version). ### Automated Tests Managed to write a test that fails before this fix. ### Manual tests 1. Create an executable file `bin/bundle` 2. Add this code to the executable ```ruby #!/usr/bin/env ruby raise "This should not be called" ``` 3. Add the bin directory to your PATH temporary: `export PATH ./bin:$PATH` 4. Verify that booting the LSP does not fail `exe/ruby-lsp`
- Loading branch information
Showing
4 changed files
with
87 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ bindir | |
binmode | ||
binread | ||
binstub | ||
binstubs | ||
Bizt | ||
Bizw | ||
bufnr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters