diff --git a/run-tests.ps1 b/run-tests.ps1 index 5c61a5fe5..d774f7a61 100644 --- a/run-tests.ps1 +++ b/run-tests.ps1 @@ -90,8 +90,9 @@ Invoke-Expression $testRunnerCmd cd $PSScriptRoot +$exitCodeOfTests = $LASTEXITCODE; -if (0 -ne ([int]$LASTEXITCODE)) { +if (0 -ne ([int]$exitCodeOfTests)) { # check submodule status $submoduleStatus = CheckSubmoduleStatus if ([int]$submoduleStatus -eq 1) { @@ -108,4 +109,4 @@ if (0 -ne ([int]$LASTEXITCODE)) { } } -exit $LASTEXITCODE +exit $exitCodeOfTests