No longer need VBoxmanage.exe to be in PATH in Cygwin.

This commit is contained in:
John Barney 2013-02-10 01:40:59 -08:00
parent cea8c5dafd
commit e0949085a0
1 changed files with 5 additions and 2 deletions

View File

@ -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