Fixes [GH-654] on Windows 8x64 and Ruby 1.9.3p374
Replaces the command with absolute path version if it exists.
This commit is contained in:
parent
ccfd321ef9
commit
0936267314
|
@ -26,6 +26,11 @@ module Vagrant
|
||||||
def initialize(*command)
|
def initialize(*command)
|
||||||
@options = command.last.is_a?(Hash) ? command.pop : {}
|
@options = command.last.is_a?(Hash) ? command.pop : {}
|
||||||
@command = command
|
@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")
|
@logger = Log4r::Logger.new("vagrant::util::subprocess")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue