In a cmd.exe window, when I run python -c "exit(12)"
and then run echo %errorlevel%
, it prints 12
. After that, when I run python -c "exit(13)" & echo %errorlevel%
, it prints 12
.
Why does the second command fail to print the correct exit code?