mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #20857 from cevich/windows_fail_properly
Fix command failure not resulting in task failure
This commit is contained in:
@ -51,7 +51,7 @@ function Check-Exit {
|
|||||||
# https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.callstackframe
|
# https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.callstackframe
|
||||||
$caller = (Get-PSCallStack)[1]
|
$caller = (Get-PSCallStack)[1]
|
||||||
Write-Host "Exit code = '$result' from $($caller.ScriptName):$($caller.ScriptLineNumber)"
|
Write-Host "Exit code = '$result' from $($caller.ScriptName):$($caller.ScriptLineNumber)"
|
||||||
Exit $result
|
Throw "Non-zero exit code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user