From 337e51c2a6d4052671c86d449b675196ef02ae1e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 5 May 2014 22:06:22 -0700 Subject: [PATCH] providers/docker: don't reload if not created --- plugins/providers/docker/action.rb | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/plugins/providers/docker/action.rb b/plugins/providers/docker/action.rb index e21621b26..f7580fa7a 100644 --- a/plugins/providers/docker/action.rb +++ b/plugins/providers/docker/action.rb @@ -114,19 +114,22 @@ module VagrantPlugins Vagrant::Action::Builder.new.tap do |b| b.use ConfigValidate b.use Call, IsState, :not_created do |env, b2| - if !env[:result] - b2.use action_halt - end - end - - b.use Call, IsBuild do |env, b2| if env[:result] - b2.use EnvSet, force_confirm_destroy: true - b2.use action_destroy.flatten + b2.use Message, I18n.t("docker_provider.messages.not_created") + next end - end - b.use action_start + b2.use action_halt + + b2.use Call, IsBuild do |env2, b3| + if env2[:result] + b3.use EnvSet, force_confirm_destroy: true + b3.use action_destroy.flatten + end + end + + b2.use action_start + end end end