mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Fix command failure not resulting in task failure
For whatever reason (I don't understand this stuff well) the `win-podman-machine-main.ps1` script exits successfully despite the final `Check-Exit` showing a non-zero exit code was detected. Attempt to fix this by throwing an exception instead of calling `Exit`. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -51,7 +51,7 @@ function Check-Exit {
|
||||
# https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.callstackframe
|
||||
$caller = (Get-PSCallStack)[1]
|
||||
Write-Host "Exit code = '$result' from $($caller.ScriptName):$($caller.ScriptLineNumber)"
|
||||
Exit $result
|
||||
Throw "Non-zero exit code"
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user