From aca273c996c4c0cca6f6a6975373601e3b356527 Mon Sep 17 00:00:00 2001 From: "Felix C. Stegerman" Date: Mon, 24 Nov 2014 02:26:54 +0100 Subject: [PATCH] fix broken tempdir removal --- lib/vagrant/bundler.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb index 05867da15..458bd3a0c 100644 --- a/lib/vagrant/bundler.rb +++ b/lib/vagrant/bundler.rb @@ -1,3 +1,4 @@ +require "fileutils" require "monitor" require "pathname" require "set" @@ -79,7 +80,7 @@ module Vagrant # Removes any temporary files created by init def deinit - File.unlink(ENV["BUNDLE_APP_CONFIG"]) rescue nil + FileUtils.remove_entry_secure(ENV["BUNDLE_APP_CONFIG"]) rescue nil File.unlink(ENV["BUNDLE_CONFIG"]) rescue nil File.unlink(ENV["GEMFILE"]) rescue nil end