summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2018-01-16 00:31:58 +0000
committerThe Bundler Bot <bot@bundler.io>2018-01-16 00:31:58 +0000
commitbddb2e81c68f2c742612078177b3c6d7e0dbf11a (patch)
treee0bf1329699bdb8efe368e48dcdfe84386ae5b0b
parent723608f45866cee0f1b315551a8dde6a99efebc6 (diff)
parent2e7029b99e72e4adeb9077fb0194d24b4ab31091 (diff)
downloadbundler-bddb2e81c68f2c742612078177b3c6d7e0dbf11a.tar.gz
Auto merge of #6258 - bundler:seg-fix-travis-ruby-2.5, r=colby-swandale
[Source::RubyGems] Ensure the bindir exists before installing ### What was the end-user problem that led to this PR? The problem was occasional failures on CI w/ ruby 2.5 ### What was your diagnosis of the problem? My diagnosis was that there was a race condition in the rubygems installer, see https://github.com/rubygems/rubygems/pull/2148 for the fix there. ### What is your fix for the problem, implemented in this PR? My fix will ensure that directory is created before we get into that rubygems code path
-rw-r--r--lib/bundler/source/rubygems.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 3ba7641f84..72dbc0c588 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -144,6 +144,8 @@ module Bundler
bin_path = Bundler.system_bindir
end
+ Bundler.mkdir_p bin_path unless spec.executables.empty? || Bundler.rubygems.provides?(">= 2.7.5")
+
installed_spec = nil
Bundler.rubygems.preserve_paths do
installed_spec = Bundler::RubyGemsGemInstaller.at(