Skip to content

Commit a94026e

Browse files
committed
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 <[email protected]>
1 parent b01c05d commit a94026e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/git-artifacts.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,10 @@ jobs:
224224
run: |
225225
& git-sdk-64-build-installers\usr\bin\sh.exe -lc @"
226226
set -x
227-
# Let `cv2pdb` find the DLLs
228-
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}}\"
227+
228+
# Restrict `PATH` to MSYS2 and to Visual Studio (to let `cv2pdb` find the relevant DLLs)
229+
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\"
230+
229231
type -p mspdb140.dll || exit 1
230232
sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-${{matrix.arch.bitness}}-bit --build-src-pkg -o artifacts HEAD &&
231233
cp bundle-artifacts/ver artifacts/ &&

0 commit comments

Comments
 (0)