diff --git a/plugins/providers/virtualbox/driver/base.rb b/plugins/providers/virtualbox/driver/base.rb index 5dfb23aa5..f887552fb 100644 --- a/plugins/providers/virtualbox/driver/base.rb +++ b/plugins/providers/virtualbox/driver/base.rb @@ -25,7 +25,7 @@ module VagrantPlugins # Set the path to VBoxManage @vboxmanage_path = "VBoxManage" - if Vagrant::Util::Platform.windows? + if Vagrant::Util::Platform.windows? || Vagrant::Util::Platform.cygwin? @logger.debug("Windows. Trying VBOX_INSTALL_PATH for VBoxManage") # On Windows, we use the VBOX_INSTALL_PATH environmental @@ -33,6 +33,9 @@ module VagrantPlugins if ENV.has_key?("VBOX_INSTALL_PATH") # Get the path. path = ENV["VBOX_INSTALL_PATH"] + if Vagrant::Util::Platform.cygwin? + path = `cygpath -u '#{path}'`.chomp + end @logger.debug("VBOX_INSTALL_PATH value: #{path}") # There can actually be multiple paths in here, so we need to @@ -44,7 +47,7 @@ module VagrantPlugins # If the executable exists, then set it as the main path # and break out vboxmanage = "#{path}VBoxManage.exe" - if File.file?(vboxmanage) + if File.file?(vboxmanage) @vboxmanage_path = vboxmanage break end