summaryrefslogtreecommitdiff
path: root/lib/bundler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r--lib/bundler.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 38a3de0f38..22a35aa9bd 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -212,13 +212,11 @@ module Bundler
end
def tmp(name = Process.pid.to_s)
- @tmp ||= Pathname.new Dir.mktmpdir("bundler")
- @tmp.join(name)
+ Pathname.new(Dir.mktmpdir(["bundler", name]))
end
- def cleanup
- FileUtils.remove_entry_secure(@tmp) if @tmp
- rescue
+ def rm_rf(path)
+ FileUtils.remove_entry_secure(path) if path && File.exist?(path)
end
def settings