Adding Cygwin detection, and fixing pathing issue in VirtualBox driver under Cygwin
This commit is contained in:
parent
050cb482f3
commit
73eb86bad0
|
@ -14,6 +14,10 @@ module Vagrant
|
||||||
platform.include?("darwin9")
|
platform.include?("darwin9")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def cygwin?
|
||||||
|
platform.include?("cygwin")
|
||||||
|
end
|
||||||
|
|
||||||
[:darwin, :bsd, :freebsd, :linux, :solaris].each do |type|
|
[:darwin, :bsd, :freebsd, :linux, :solaris].each do |type|
|
||||||
define_method("#{type}?") do
|
define_method("#{type}?") do
|
||||||
platform.include?(type.to_s)
|
platform.include?(type.to_s)
|
||||||
|
|
|
@ -12,7 +12,10 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Import the virtual machine
|
# Import the virtual machine
|
||||||
ovf_file = env[:machine].box.directory.join("box.ovf").to_s
|
ovf_file = env[:machine].box.directory.join("box.ovf").to_s
|
||||||
env[:machine].id = env[:machine].provider.driver.import(ovf_file) do |progress|
|
if Vagrant::Util::Platform.cygwin?
|
||||||
|
ovf_file = `cygpath -w #{ovf_file}`.chomp
|
||||||
|
end
|
||||||
|
env[:machine].id = env[:machine].provider.driver.import(ovf_file) do |progress|
|
||||||
env[:ui].clear_line
|
env[:ui].clear_line
|
||||||
env[:ui].report_progress(progress, 100, false)
|
env[:ui].report_progress(progress, 100, false)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue