From 023e4b8c2309e15e7d6ee78407baa7e0fd31ae27 Mon Sep 17 00:00:00 2001 From: "Felix C. Stegerman" Date: Mon, 24 Nov 2014 16:58:59 +0100 Subject: [PATCH] force rm tempfiles (no rescue nil); use right var --- lib/vagrant/bundler.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb index 458bd3a0c..dfe8a17c1 100644 --- a/lib/vagrant/bundler.rb +++ b/lib/vagrant/bundler.rb @@ -80,9 +80,9 @@ module Vagrant # Removes any temporary files created by init def deinit - FileUtils.remove_entry_secure(ENV["BUNDLE_APP_CONFIG"]) rescue nil - File.unlink(ENV["BUNDLE_CONFIG"]) rescue nil - File.unlink(ENV["GEMFILE"]) rescue nil + %w{ BUNDLE_APP_CONFIG BUNDLE_CONFIG BUNDLE_GEMFILE }.each do |entry| + FileUtils.remove_entry_secure(ENV[entry], true) + end end # Installs the list of plugins.