From 60208ade85e9f3f1f47a6ed6027196cbd0593351 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 23 Feb 2021 11:39:15 +0100 Subject: [PATCH] git-artifacts: use a narrower `PATH` GitHub workflows run in agents that have quite a bit of stuff in their `PATH`, e.g. Chocolatey. To make sure that those bits and pieces are _not_ used to build the artifacts, let's whittle down the `PATH` to contain the bare minimum. Signed-off-by: Johannes Schindelin --- .github/workflows/git-artifacts.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/git-artifacts.yml b/.github/workflows/git-artifacts.yml index 630a3e17b58273..f1b0426779e9b4 100644 --- a/.github/workflows/git-artifacts.yml +++ b/.github/workflows/git-artifacts.yml @@ -224,8 +224,10 @@ jobs: run: | & git-sdk-64-build-installers\usr\bin\sh.exe -lc @" set -x - # Let `cv2pdb` find the DLLs - PATH=\"`$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin${{matrix.arch.bin}}\" + + # Restrict `PATH` to MSYS2 and to Visual Studio (to let `cv2pdb` find the relevant DLLs) + PATH=\"`/mingw64/bin:/usr/bin:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin${{matrix.arch.bin}}:/C/Windows/system32\" + type -p mspdb140.dll || exit 1 sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-${{matrix.arch.bitness}}-bit --build-src-pkg -o artifacts HEAD && cp bundle-artifacts/ver artifacts/ &&