[Git][ghc/ghc][master] hadrian/build-cabal.bat: fix build on Windows
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 40564e8d by sheaf at 2026-04-27T09:34:46-04:00 hadrian/build-cabal.bat: fix build on Windows Commit 8cb99552f6 introduced a warning for a missing package index. However, the logic was faulty on Windows: the piping was broken, and "remote-repo-cache:" was being interpreted as a (malformed) drive letter, leading to the error: The filename, directory name, or volume label syntax is incorrect. This commit fixes that by using a temporary file instead of piping. - - - - - 1 changed file: - hadrian/build-cabal.bat Changes: ===================================== hadrian/build-cabal.bat ===================================== @@ -39,7 +39,9 @@ if %CABMAJOR% lss 3 ( exit /B 2 ) -for /F "tokens=*" %%a in ('"%CABAL%" --with-compiler=%GHC% path --output-format=key-value 2^>NUL ^| findstr /B "remote-repo-cache:"') do set REMOTE_REPO_CACHE=%%a +"%CABAL%" --with-compiler=%GHC% path --output-format=key-value > "%TEMP%\ghc_cabal_path.txt" 2>NUL +for /F "tokens=*" %%a in ('findstr /B "remote-repo-cache:" "%TEMP%\ghc_cabal_path.txt"') do set REMOTE_REPO_CACHE=%%a +del "%TEMP%\ghc_cabal_path.txt" 2>NUL set REMOTE_REPO_CACHE=%REMOTE_REPO_CACHE:remote-repo-cache: =% if not exist "%REMOTE_REPO_CACHE%\hackage.haskell.org" ( echo Please run 'cabal update' first View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/40564e8daaf8258088458b93c3ad9d66... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/40564e8daaf8258088458b93c3ad9d66... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)