I'm running some python code that is exiting via sys.exit(1)
when failures occur. However, PowerShell (which is calling this code) doesn't terminate, even though I've told it to.
Example code that illustrates the issue:
python -c "import sys; sys.exit(1)"
Write-Host "The exit code is $LASTEXITCODE -- why is this running?"
What am I missing here?
I'm launching the code via:
.\test.ps1
(for example)
PowerShell version:
Major Minor Build Revision
----- ----- ----- --------
5 1 18362 145