Merge pull request #7499 from mitchellh/sethvargo/ensure_delete

core/box_collection: Ensure removal
This commit is contained in:
Seth Vargo 2016-06-20 09:31:06 -04:00 committed by GitHub
commit c6f2f3bd12
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
require "digest/sha1"
require "fileutils"
require "monitor"
require "tmpdir"
@ -447,7 +448,7 @@ module Vagrant
yield dir
ensure
dir.rmtree if dir.exist?
FileUtils.rm_rf(dir.to_s)
end
# Checks if a box with a given name exists.