diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index 4379304b8..8003cdc0f 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -26,6 +26,11 @@ module Vagrant def initialize(*command) @options = command.last.is_a?(Hash) ? command.pop : {} @command = command + if Platform.windows? + locations = `where #{command[0]}` + new_command = "#{locations.split("\n")[0]}" + @command[0] = new_command if $?.success? and File.exists?(new_command) + end @logger = Log4r::Logger.new("vagrant::util::subprocess") end