From e0949085a0818803eb17bfec59b69c2a47b7f0ea Mon Sep 17 00:00:00 2001 From: John Barney Date: Sun, 10 Feb 2013 01:40:59 -0800 Subject: [PATCH] No longer need VBoxmanage.exe to be in PATH in Cygwin. --- plugins/providers/virtualbox/driver/base.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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