Fix Windows + JRuby no longer being able to install git sources #4196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the end-user or developer problem that led to this PR?
The problem is that bundler 2.2 can no longer install git sources under Windows + JRuby.
What is your fix for the problem, implemented in this PR?
First I considered it could be a Windows escaping issue, so I made some changes so that the
git
commandsbundler
runs under the hood no longer use a shell but callgit
directly. This is similar to #4190, but forbundler
. I'm unsure whether that fixed anything regarding this issue, but I'd say no because Ruby on Windows CI was previously passing, so it must be something specific to jruby. Anyways, this change seems like a good move anyways, so I left it there.After that, I remembered being hit by some issues with jruby not properly handling the
:chdir
parameter toProcess.spawn
and friends. See jruby/jruby#6153.So to workaround this issue I tried using the
-C
CLI flag togit
instead of the:chdir
parameter toProcess.spawn
, and that worked just fine!I also added a bare integration test to specifically check this simple case on JRuby + Windows.
Fixes #4195.
Make sure the following tasks are checked