Handle already-installed MSYS2 in build script

Check if MSYS2 is already present by looking for the bash executable,
even if winget reports it's already installed. This allows the script
to continue with GCC installation instead of failing.
This commit is contained in:
Stu Leak 2025-12-04 17:50:58 -05:00
parent 76efd14768
commit 41158765c9

View File

@ -94,6 +94,11 @@ if !GCC_CHECK! neq 0 (
winget install -e --id=MSYS2.MSYS2
set MSYS2_INSTALL_RESULT=!ERRORLEVEL!
REM Check if MSYS2 is installed (either newly installed or already present)
if exist "C:\msys64\usr\bin\bash.exe" (
set MSYS2_INSTALL_RESULT=0
)
if !MSYS2_INSTALL_RESULT! equ 0 (
echo [OK] MSYS2 installed successfully!
echo.