More robust VBOX_INSTALL_PATH handling on Windows

This commit is contained in:
Mitchell Hashimoto 2012-01-07 13:13:17 -08:00
parent 75539c2abe
commit 4b52c39733
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,10 @@ module Vagrant
# On Windows, we use the VBOX_INSTALL_PATH environmental
# variable to find VBoxManage.
if ENV.has_key?("VBOX_INSTALL_PATH")
@vboxmanage_path = "#{ENV["VBOX_INSTALL_PATH"]}\VBoxManage.exe"
# The path usually ends with a \ but we make sure here
path = ENV["VBOX_INSTALL_PATH"]
path += "\\" if !path.end_with?("\\")
@vboxmanage_path = "#{path}VBoxManage.exe"
end
end