core: actually get the proper encoded subprocess command [GH-5128]

This commit is contained in:
Mitchell Hashimoto 2015-07-06 14:39:50 -06:00
parent 6dffec4bf9
commit bb25bb3be9
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ module Vagrant
def initialize(*command)
@options = command.last.is_a?(Hash) ? command.pop : {}
@command = command.dup
@command.each { |s| s.encode(Encoding.default_external) }
@command = @command.map { |s| s.encode(Encoding.default_external) }
@command[0] = Which.which(@command[0]) if !File.file?(@command[0])
if !@command[0]
raise Errors::CommandUnavailableWindows, file: command[0] if Platform.windows?