Include debug logging of string conversions

This commit is contained in:
Chris Roberts 2017-06-27 19:10:18 -07:00
parent f3daf5fad7
commit f341945a29
1 changed files with 3 additions and 0 deletions

View File

@ -42,8 +42,11 @@ module Vagrant
else
if Vagrant::Util::Platform.windows?
# Re-generate strings to ensure common encoding
@@logger.debug("Converting command and arguments to common UTF-8 encoding for exec.")
@@logger.debug("Command: `#{command.inspect}` Args: `#{args.inspect}`")
command = "#{command}".force_encoding("UTF-8")
args = args.map{|arg| "#{arg}".force_encoding("UTF-8") }
@@logger.debug("Converted - Command: `#{command.inspect}` Args: `#{args.inspect}`")
end
Kernel.exec(command, *args)
end