diff options
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 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] |