From 093626731455ab24f31127205e2a504e8a0acb81 Mon Sep 17 00:00:00 2001 From: Gabor Nagy Date: Sat, 1 Jun 2013 14:29:45 +0200 Subject: [PATCH] Fixes [GH-654] on Windows 8x64 and Ruby 1.9.3p374 Replaces the command with absolute path version if it exists. --- lib/vagrant/util/subprocess.rb | 5 +++++ 1 file changed, 5 insertions(+) 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