When import recovers, don't validate when calling destroy

This commit is contained in:
Mitchell Hashimoto 2011-12-14 23:35:46 -08:00
parent a23ebf7220
commit 345ee35e16
1 changed files with 5 additions and 2 deletions

View File

@ -30,8 +30,11 @@ module Vagrant
if env[:vm].created?
return if env["vagrant.error"].is_a?(Errors::VagrantError)
# Interrupted, destroy the VM
env[:action_runner].run(:destroy, env)
# Interrupted, destroy the VM. We note that we don't want to
# validate the configuration here.
destroy_env = env.clone
destroy_env[:validate] = false
env[:action_runner].run(:destroy, destroy_env)
end
end
end