Don't delete package file if package output exists

This commit is contained in:
Michael Linderman 2011-07-08 14:18:02 -07:00 committed by Mitchell Hashimoto
parent 0b02deb37a
commit 5bf4efe071
1 changed files with 4 additions and 2 deletions

View File

@ -38,8 +38,10 @@ module Vagrant
end
def recover(env)
# Cleanup any packaged files if the packaging failed at some point.
File.delete(tar_path) if File.exist?(tar_path)
unless env["vagrant.error"].is_a?(Errors::PackageOutputExists)
# Cleanup any packaged files if the packaging failed at some point.
File.delete(tar_path) if File.exist?(tar_path)
end
end
def files_to_copy