Support multiple paths in VBOX_INSTALL_PATH [GH-885]
This commit is contained in:
parent
04df9bc80b
commit
359ea23069
|
@ -14,6 +14,8 @@
|
|||
- Fix issue where changing SSH key permissions didn't properly work. [GH-911]
|
||||
- Disable the NAT DNS proxy when the DNS server is already proxied to
|
||||
localhost on Linux machines. This fixes issues with 12.04. [GH-909]
|
||||
- Fix issue where Vagrant didn't properly detect VBoxManage on Windows
|
||||
if VBOX_INSTALL_PATH contained multiple paths. [GH-885]
|
||||
|
||||
## 1.0.3 (May 1, 2012)
|
||||
|
||||
|
|
|
@ -31,10 +31,24 @@ module Vagrant
|
|||
# On Windows, we use the VBOX_INSTALL_PATH environmental
|
||||
# variable to find VBoxManage.
|
||||
if ENV.has_key?("VBOX_INSTALL_PATH")
|
||||
# The path usually ends with a \ but we make sure here
|
||||
# Get the path.
|
||||
path = ENV["VBOX_INSTALL_PATH"]
|
||||
path += "\\" if !path.end_with?("\\")
|
||||
@vboxmanage_path = "#{path}VBoxManage.exe"
|
||||
@logger.debug("VBOX_INSTALL_PATH value: #{path}")
|
||||
|
||||
# There can actually be multiple paths in here, so we need to
|
||||
# split by the separator ";" and see which is a good one.
|
||||
path.split(";").each do |single|
|
||||
# Make sure it ends with a \
|
||||
single += "\\" if !single.end_with?("\\")
|
||||
|
||||
# If the executable exists, then set it as the main path
|
||||
# and break out
|
||||
vboxmanage = "#{path}VBoxManage.exe"
|
||||
if File.file?(vboxmanage)
|
||||
@vboxmanage_path = vboxmanage
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue