summaryrefslogtreecommitdiff
path: root/lib/bundler/rubygems_gem_installer.rb
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2021-10-14 12:03:51 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-10-25 20:48:51 +0900
commit00412be20469407cd6da813eab6bfa5b63cd945f (patch)
treec6d8bd2a1a935e55eda72aa810859a1ca8c732db /lib/bundler/rubygems_gem_installer.rb
parentf6d190950055f8700b144ab075971edd08754d52 (diff)
[rubygems/rubygems] Show a proper error if gem path is not writable
Instead of showing the bug report place with an error at a randome place. https://github.com/rubygems/rubygems/commit/241854ce73
Diffstat (limited to 'lib/bundler/rubygems_gem_installer.rb')
-rw-r--r--lib/bundler/rubygems_gem_installer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb
index fa46451887..39c9031c4a 100644
--- a/lib/bundler/rubygems_gem_installer.rb
+++ b/lib/bundler/rubygems_gem_installer.rb
@@ -19,7 +19,9 @@ module Bundler
FileUtils.rm_rf gem_dir
FileUtils.rm_rf spec.extension_dir
- FileUtils.mkdir_p gem_dir, :mode => 0o755
+ SharedHelpers.filesystem_access(gem_dir, :create) do
+ FileUtils.mkdir_p gem_dir, :mode => 0o755
+ end
extract_files