mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
exit wit code 1 from powershell commands that fail but do not send an exit code
This commit is contained in:
parent
0ebb57b888
commit
e22767184b
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ module VagrantPlugins
|
|||
def powershell(command, &block)
|
||||
# ensure an exit code
|
||||
command << "\r\n"
|
||||
command << "if ($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 0 }"
|
||||
command << "if ($?) { exit 0 } else { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } }"
|
||||
execute_shell(command, :powershell, &block)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue