summaryrefslogtreecommitdiffhomepage
path: root/compile
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2024-08-03 16:14:15 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2024-08-22 00:01:06 +0100
commitacbd30e0427b16f885f96aed59881ec04eff25bc (patch)
tree56a9d4506bfb4b4a7c492096ee3e3b7dc95c1896 /compile
parent44902cb49cd51e2bb2f1cef05cb3c0e799b83434 (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 'compile')
0 files changed, 0 insertions, 0 deletions