Merge pull request #8539 from chrisroberts/fix/win-prov-bat
Fix shell provisioner to execute batch files correctly
This commit is contained in:
commit
1c00aa3d98
|
@ -191,8 +191,11 @@ module VagrantPlugins
|
|||
shell_args += " -OutputFormat Text" if config.powershell_args !~ /[-\/]OutputFormat/i
|
||||
|
||||
command = "\"#{exec_path}\"#{args}"
|
||||
command = "powershell #{shell_args.to_s} -file #{command}" if
|
||||
File.extname(exec_path).downcase == '.ps1'
|
||||
if File.extname(exec_path).downcase == ".ps1"
|
||||
command = "powershell #{shell_args.to_s} -file #{command}"
|
||||
else
|
||||
command = "cmd /q /c #{command}"
|
||||
end
|
||||
|
||||
# Append the environment
|
||||
if !env.empty?
|
||||
|
|
Loading…
Reference in New Issue