diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-13 20:58:08 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-14 10:48:07 +0900 |
commit | 896bbb9fadd10e1ad06ff3fd7d0608acda01ac06 (patch) | |
tree | c6f97aa1b1ed5192dfdd9b84317b742020ec3cb0 /lib/bundler.rb | |
parent | 29f6f79e7396018962eb25c5f5e409f5fe28a73b (diff) |
Merge RubyGems/Bundler master from 8459ebd6ad65ce3397233416dc64083ae7572bb9
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4648
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r-- | lib/bundler.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index a7d5d1e64a..b88bab8f0a 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] |