summaryrefslogtreecommitdiff
path: root/lib/bundler.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-02 12:05:18 +0900
committernagachika <nagachika@ruby-lang.org>2021-08-19 15:46:40 +0900
commitf1039afa4179f9d3a42f0d89b499e3c955b495d9 (patch)
tree6fb8b5fdbaaca16de553f40645fed69c13720908 /lib/bundler.rb
parent4469c4e4beadbe568c5958798afa3316bf292a12 (diff)
Merge RubyGems 3.2.23 and Bundler 2.2.23
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r--lib/bundler.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 8b9e870f7b..e3127adb6b 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -236,8 +236,9 @@ module Bundler
end
if warning
- user_home = tmp_home_path(warning)
- Bundler.ui.warn "#{warning}\nBundler will use `#{user_home}' as your home directory temporarily.\n"
+ Bundler.ui.warn "#{warning}\n"
+ user_home = tmp_home_path
+ Bundler.ui.warn "Bundler will use `#{user_home}' as your home directory temporarily.\n"
user_home
else
Pathname.new(home)
@@ -684,15 +685,13 @@ EOF
Bundler.rubygems.clear_paths
end
- def tmp_home_path(warning)
+ def tmp_home_path
Kernel.send(:require, "tmpdir")
SharedHelpers.filesystem_access(Dir.tmpdir) do
path = Bundler.tmp
at_exit { Bundler.rm_rf(path) }
path
end
- rescue RuntimeError => e
- raise e.exception("#{warning}\nBundler also failed to create a temporary home directory':\n#{e}")
end
# @param env [Hash]