diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2024-08-03 16:14:15 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2024-08-22 00:01:06 +0100 |
commit | acbd30e0427b16f885f96aed59881ec04eff25bc (patch) | |
tree | 56a9d4506bfb4b4a7c492096ee3e3b7dc95c1896 /src/tier0stub.c | |
parent | 44902cb49cd51e2bb2f1cef05cb3c0e799b83434 (diff) |
Prevent errorlevel weirdness in compile.bat
This is an issue I've known about for a little while and kept forgetting
to fix here. It's not been a huge issue for anyone, but still, improving
correctness is always a good thing.
Essentially, if you run a batch file straight through cmd /c, rather
than interactively, exit /b with no number doesn't actually propagate
the errorlevel value correctly, which is obviously bad. To fix this,
just jump to the end on error and then explicitly return the errorlevel.
If everything succeeds, this will of course still return 0, as expected.
Special thanks go to Microsoft for writing this bug decades ago and
never fixing it, probably in the name of backwards compatibility.
Diffstat (limited to 'src/tier0stub.c')
0 files changed, 0 insertions, 0 deletions