Bug
cmdlet does not exit with non-zero exit code when compiler compile fails.
Expectation
cmdlet does exit with non-zero exit code when compiler compile fails.
Two ways to get a non-zero exit code in powershell:
throw a terminating error in the script (we lose the exit code of the compiler)
exit 1 in the script (we exit the entire powershell process)
- Populate the
$global:LASTEXITCODE for consumer to read.
Edit: I think its better to pass exit code via option 3 instead of the first two options.
Bug
cmdlet does not exit with non-zero exit code when compiler compile fails.
Expectation
cmdlet does exit with non-zero exit code when compiler compile fails.
Two ways to get a non-zero exit code in powershell:
throwa terminating error in the script (we lose the exit code of the compiler)exit 1in the script (we exit the entire powershell process)$global:LASTEXITCODEfor consumer to read.Edit: I think its better to pass exit code via option 3 instead of the first two options.