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.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Stu Leak 2025-12-04 17:50:58 -05:00
parent 0bbb5e8dbf
commit 1b0ec5b90e

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.