diff options
author | The Bundler Bot <bot@bundler.io> | 2018-01-16 00:31:58 +0000 |
---|---|---|
committer | Colby Swandale <me@colby.fyi> | 2018-04-20 10:26:13 +1000 |
commit | 05028836599dfec8f89e2bbf16cface435b92df3 (patch) | |
tree | 6d7d22c3a072acd9e82bed5efc9736932fe9a25d | |
parent | 35829b9ebed452f2e28c18bd5e87a600ea81723c (diff) | |
download | bundler-05028836599dfec8f89e2bbf16cface435b92df3.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
(cherry picked from commit bddb2e81c68f2c742612078177b3c6d7e0dbf11a)
-rw-r--r-- | lib/bundler/source/rubygems.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 3cf22a50f1..cd37f8cfc6 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -138,6 +138,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( |