diff --git a/lib/vagrant/util/safe_exec.rb b/lib/vagrant/util/safe_exec.rb index 37e6a38c3..f7f5bdb81 100644 --- a/lib/vagrant/util/safe_exec.rb +++ b/lib/vagrant/util/safe_exec.rb @@ -40,7 +40,15 @@ module Vagrant Process.wait(pid) end else - Kernel.exec(command, *args) + if Vagrant::Util::Platform.windows? + @@logger.debug("Converting command and arguments to single string for exec") + @@logger.debug("Command: `#{command.inspect}` Args: `#{args.inspect}`") + full_command = "#{command} #{args.join(" ")}" + @@logger.debug("Converted command: #{full_command}") + Kernel.exec(full_command) + else + Kernel.exec(command, *args) + end end rescue *rescue_from # We retried already, raise the issue and be done