framegen: PLAY_FRAMEGEN.cmd check returns the check's answer

The check branch exited 0 whatever the script said, so a caller of
"PLAY_FRAMEGEN.cmd check" read success on a failed check (the script
exits 1 with the game folder not found). The branch is no longer a
block, so errorlevel is the script's own, read where it was set.
This commit is contained in:
Cannnabis
2026-11-28 02:42:25 +07:00
parent 0cef07e9d7
commit cb465e00d8

View File

@ -12,11 +12,12 @@ if not exist "%PS1%" (
pause
exit /b 1
)
if /i "%~1"=="check" (
%PSH% -NoProfile -ExecutionPolicy Bypass -File "%PS1%" -Check
pause
exit /b 0
)
if /i not "%~1"=="check" goto :menu
%PSH% -NoProfile -ExecutionPolicy Bypass -File "%PS1%" -Check
pause
rem The check's answer is what callers read: a failed check says so.
exit /b %errorlevel%
:menu
set "PICK=%~1"
if not "%PICK%"=="" goto :run