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,9 +38,11 @@ module Vagrant
end end
def recover(env) def recover(env)
unless env["vagrant.error"].is_a?(Errors::PackageOutputExists)
# Cleanup any packaged files if the packaging failed at some point. # Cleanup any packaged files if the packaging failed at some point.
File.delete(tar_path) if File.exist?(tar_path) File.delete(tar_path) if File.exist?(tar_path)
end end
end
def files_to_copy def files_to_copy
package_dir = Pathname.new(@env["package.directory"]).join("include") package_dir = Pathname.new(@env["package.directory"]).join("include")