Created
July 11, 2021 23:44
-
-
Save tinytengu/aaf54bed4b78cd70bffed0cfbc047bd5 to your computer and use it in GitHub Desktop.
Batch force script halt for setlocal, etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:halt | |
call :__SetErrorLevel %1 | |
call :__ErrorExit 2> nul | |
goto :eof | |
:__ErrorExit | |
() | |
goto :eof | |
:__SetErrorLevel | |
exit /b %time:~-2% | |
goto :eof | |
rem Usage: goto halt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment