Quote exec_path to properly handle spaces in path

Fixes #7234
This commit is contained in:
Chris Roberts 2017-04-19 12:23:55 -07:00
parent 61c556ff90
commit 82e268a3e2
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ module VagrantPlugins
# CLIXML output is kinda useless, especially on non-windows hosts
shell_args += " -OutputFormat Text" if config.powershell_args !~ /[-\/]OutputFormat/i
command = "#{exec_path}#{args}"
command = "\"#{exec_path}\"#{args}"
command = "powershell #{shell_args.to_s} -file #{command}" if
File.extname(exec_path).downcase == '.ps1'