lib/kitchen/driver/docker.rb in kitchen-docker-2.0.0 vs lib/kitchen/driver/docker.rb in kitchen-docker-2.1.0

- old
+ new

@@ -61,13 +61,22 @@ end default_config :disable_upstart, true def verify_dependencies - run_command("#{config[:binary]} >> /dev/null 2>&1", :quiet => true) + run_command("#{config[:binary]} >> #{dev_null} 2>&1", :quiet => true) rescue raise UserError, 'You must first install the Docker CLI tool http://www.docker.io/gettingstarted/' + end + + def dev_null + case RbConfig::CONFIG["host_os"] + when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ + "NUL" + else + "/dev/null" + end end def default_image platform, release = instance.platform.name.split('-') if platform == 'centos' && release