From 51716c5ef0bb112ff9fc5db33892961c54ffee04 Mon Sep 17 00:00:00 2001 From: Dimitrios Kouzis-Loukas Date: Sun, 27 Aug 2017 23:45:44 -0400 Subject: [PATCH] fix for issue 8608 --- plugins/providers/docker/driver.rb | 2 +- plugins/providers/docker/executor/local.rb | 4 ++++ plugins/providers/docker/executor/vagrant.rb | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/providers/docker/driver.rb b/plugins/providers/docker/driver.rb index 6e7a136ad..fc53926fd 100644 --- a/plugins/providers/docker/driver.rb +++ b/plugins/providers/docker/driver.rb @@ -48,7 +48,7 @@ module VagrantPlugins run_cmd += ports.map { |p| ['-p', p.to_s] } run_cmd += volumes.map { |v| v = v.to_s - if v.include?(":") && (Vagrant::Util::Platform.windows? || Vagrant::Util::Platform.wsl?) + if v.include?(":") && @executor.windows? host, guest = v.split(":", 2) host = Vagrant::Util::Platform.windows_path(host) # NOTE: Docker does not support UNC style paths (which also diff --git a/plugins/providers/docker/executor/local.rb b/plugins/providers/docker/executor/local.rb index 55c55cf2c..c78e8c90e 100644 --- a/plugins/providers/docker/executor/local.rb +++ b/plugins/providers/docker/executor/local.rb @@ -29,6 +29,10 @@ module VagrantPlugins result.stdout end + + def windows? + ::Vagrant::Util::Platform.windows? || ::Vagrant::Util::Platform.wsl? + end end end end diff --git a/plugins/providers/docker/executor/vagrant.rb b/plugins/providers/docker/executor/vagrant.rb index c25af2006..dd64ea870 100644 --- a/plugins/providers/docker/executor/vagrant.rb +++ b/plugins/providers/docker/executor/vagrant.rb @@ -65,6 +65,10 @@ module VagrantPlugins stdout.chomp end + def windows? + false + end + protected def ssh_run(cmd)