aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-05-05 14:50:58 -0700
committerAndre Arko <andre@arko.net>2015-05-07 08:40:33 +0100
commit4820162414b6d7ed1eee5d8c8397533cadff46e3 (patch)
treee23724a5574e5cb5baf39aceadd592ae8940d320 /lib/bundler.rb
parent1d9f3763aabc842d50cc2a88c77b216c5be77c64 (diff)
downloadbundler-4820162414b6d7ed1eee5d8c8397533cadff46e3.tar.gz
clean up tmp dirs if they get created
backport of ae865a073c4e713d6f9c2a6143a0e81041031eb8
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 38a3de0f..22a35aa9 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