From 81818f36fc3b37a550f1aedfb218a5cb729d9ddd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 17 Apr 2014 17:03:54 -0700 Subject: [PATCH] providers/docker: graceful halt only if SSH is available --- plugins/providers/docker/action.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/providers/docker/action.rb b/plugins/providers/docker/action.rb index fff5dbb44..d2e101e91 100644 --- a/plugins/providers/docker/action.rb +++ b/plugins/providers/docker/action.rb @@ -53,9 +53,16 @@ module VagrantPlugins next end - b2.use Call, GracefulHalt, :stopped, :running do |env2, b3| + b2.use Call, HasSSH do |env2, b3| if !env2[:result] b3.use Stop + next + end + + b3.use Call, GracefulHalt, :stopped, :running do |env3, b4| + if !env3[:result] + b4.use Stop + end end end end