lib/bundler.rb in bundler-1.9.6 vs lib/bundler.rb in bundler-1.9.7
- old
+ new
@@ -210,16 +210,14 @@
path = custom_path || root
path.join(self.settings.app_cache_path)
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
return @settings if defined?(@settings)
@settings = Settings.new(app_config_path)