Merge pull request #787 from mkhon/fix-start

Do not destroy domain when starting existing domain
This commit is contained in:
Gerben Meijer
2017-08-03 16:56:21 +02:00
committed by GitHub
2 changed files with 13 additions and 5 deletions

View File

@@ -54,6 +54,7 @@ module VagrantPlugins
# b2.use SyncFolders
end
else
env[:halt_on_error] = true
b2.use action_start
end
end

View File

@@ -89,6 +89,12 @@ module VagrantPlugins
# If we're not supposed to destroy on error then just return
return unless env[:destroy_on_error]
if env[:halt_on_error]
halt_env = env.dup
halt_env.delete(:interrupted)
halt_env[:config_validate] = false
env[:action_runner].run(Action.action_halt, halt_env)
else
destroy_env = env.dup
destroy_env.delete(:interrupted)
destroy_env[:config_validate] = false
@@ -100,3 +106,4 @@ module VagrantPlugins
end
end
end
end