Put MSYS2 on the PATH on Windows
@@ -92,21 +92,12 @@ $env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine")
## Install MSYS2
Write-Host "Installing MSYS2..."
-# FYI: We don't add MSYS2 to the PATH on purpose.
-& choco install msys2 --params "'/NoPath /NoUpdate'"
+& choco install msys2
[Environment]::SetEnvironmentVariable("BAZEL_SH", "C:\tools\msys64\usr\bin\bash.exe", "Machine")
$env:BAZEL_SH = [Environment]::GetEnvironmentVariable("BAZEL_SH", "Machine")
Set-Alias bash "c:\tools\msys64\usr\bin\bash.exe"
-## Update MSYS2 once.
-Write-Host "Updating MSYS2 packages (round 1)..."
-& bash -lc "pacman --noconfirm -Syuu"
-
-## Update again, in case the first round only upgraded core packages.
-Write-Host "Updating MSYS2 packages (round 2)..."
-& bash -lc "pacman --noconfirm -Syuu"
-
## Install MSYS2 packages required by Bazel.
Write-Host "Installing required MSYS2 packages..."
& bash -lc "pacman --noconfirm --needed -S curl zip unzip gcc tar diffutils patch perl mingw-w64-x86_64-gcc"
