Skip to content

Commit

Permalink
Installer: Don't use call and goto before the line ending check.
Browse files Browse the repository at this point in the history
This needs to be 100% safe because it can delete somebody's data.
  • Loading branch information
RedGreenBlue09 committed Jun 30, 2024
1 parent d832d2a commit a294568
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Installer.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if %PLV% NEQ 0 (
echo Powershell cannot be found. Please enable Powershell.
echo Error code: %PLV%
echo.
call :CustomPause "Press any key to exit ... "
set<nul /p "= Press any key to exit ... "
pause >nul
exit /B
)

Expand All @@ -22,7 +23,8 @@ if "%NotCrlf%" EQU "True" (
echo The script's line endings must be CRLF ^(Windows^).
echo Please fully convert it to CRLF.
echo.
call :CustomPause "Press any key to exit ... "
set<nul /p "= Press any key to exit ... "
pause >nul
exit /B
)

Expand Down Expand Up @@ -726,6 +728,6 @@ exit /B
set "PauseMessage=%~1"
if "%PauseMessage%" EQU "" (set "PauseMessage=Press any key to continue ... ")
set<nul /p "= %PauseMessage%"
pause>nul
pause >nul
echo.
goto :EOF

0 comments on commit a294568

Please sign in to comment.