diff --git a/build.ps1 b/build.ps1 index 60bc1df8..922a8030 100644 --- a/build.ps1 +++ b/build.ps1 @@ -30,7 +30,7 @@ $env:DOTNET_MULTILEVEL_LOOKUP = 0 ########################################################################### function ExecSafe([scriptblock] $cmd) { - $LASTEXITCODE = 0 + $global:LASTEXITCODE = 0 & $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } }