From 5573cd320cd80f6ed9d44aa6129570380280f0fd Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Mon, 10 Feb 2025 12:16:27 +0000 Subject: [PATCH] Prevent /msys64/bin from being prepended to PATH --- src/ci/scripts/install-mingw.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh index 91eab2e7a081..c8c501e646a9 100755 --- a/src/ci/scripts/install-mingw.sh +++ b/src/ci/scripts/install-mingw.sh @@ -32,6 +32,12 @@ if isWindows && isKnownToBeMingwBuild; then ;; esac + # Stop /msys64/bin from being prepended to PATH by adding the bin directory manually. + # Note that this intentionally uses a Windows style path instead of the msys2 path to + # avoid being auto-translated into `/usr/bin`, which will not have the desired effect. + msys2Path="c:/msys64" + ciCommandAddPath "${msys2Path}/usr/bin" + mingw_dir="mingw${bits}" curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}"