summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2018-01-15 15:48:11 -0800
committerSamuel Giddins <segiddins@segiddins.me>2018-01-15 15:48:11 -0800
commit2e7029b99e72e4adeb9077fb0194d24b4ab31091 (patch)
treee0bf1329699bdb8efe368e48dcdfe84386ae5b0b
parent723608f45866cee0f1b315551a8dde6a99efebc6 (diff)
downloadbundler-seg-fix-travis-ruby-2.5.tar.gz
[Source::RubyGems] Ensure the bindir exists before installingseg-fix-travis-ruby-2.5
This will help avoid a potential race condition in RubyGems
-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(