Don't spin on containers that are auto-restarting

Don’t spin on containers that are auto-restarting

State.Running=true does not mean that a container is running… oh no, that would be too fucking simple. Only State.Status=“running” means that the container is actually running.

diff --git a/lib/mobystash/container.rb b/lib/mobystash/container.rb
index b87687b..436fd8a 100644
--- a/lib/mobystash/container.rb
+++ b/lib/mobystash/container.rb
@@ -166,7 +166,7 @@ module Mobystash
 
       if @capture_logs
         begin
-          unless Docker::Container.get(@id, {}, conn).info.fetch("State", {}).fetch("Running")
+          unless Docker::Container.get(@id, {}, conn).info.fetch("State", {}).fetch("Status") == "running"
             @logger.debug(progname) { "Container is not running; waiting for it to start or be destroyed" }
             wait_for_container_to_start(conn)
           else

GitHub sha: 77337dc3