Merge pull request #4861 from obfusk/fix-tmpdir-delete

fix broken tempdir removal
This commit is contained in:
Seth Vargo 2014-11-24 11:16:11 -05:00
commit 00e388a897
1 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
require "fileutils"
require "monitor" require "monitor"
require "pathname" require "pathname"
require "set" require "set"
@ -79,9 +80,9 @@ module Vagrant
# Removes any temporary files created by init # Removes any temporary files created by init
def deinit def deinit
File.unlink(ENV["BUNDLE_APP_CONFIG"]) rescue nil %w{ BUNDLE_APP_CONFIG BUNDLE_CONFIG BUNDLE_GEMFILE }.each do |entry|
File.unlink(ENV["BUNDLE_CONFIG"]) rescue nil FileUtils.remove_entry_secure(ENV[entry], true)
File.unlink(ENV["GEMFILE"]) rescue nil end
end end
# Installs the list of plugins. # Installs the list of plugins.