Skip to content

Commit c1a378c

Browse files
committed
CI - Win: hide msys64 in Ruby tool-cache (find -maxdepth was too shallow)
1 parent 8342fce commit c1a378c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,18 @@ jobs:
180180
./mac-prebuild.sh
181181
if: matrix.os == 'macos-latest'
182182

183-
# Hide every msys64 dir (system root + the one bundled in setup-ruby's
183+
# Hide every msys64 dir (system root + any bundled in setup-ruby's
184184
# tool-cache install) before vcpkg runs. Otherwise vcpkg's libflac port
185185
# picks up the mingw cmake.exe from msys64 and the MSVC-triplet build
186-
# blows up. Done in bash so we can find them all reliably regardless
187-
# of where the Ruby tool-cache lives.
186+
# blows up. The Ruby-tool-cache copy lives at e.g.
187+
# /c/hostedtoolcache/windows/Ruby/3.4.4/x64/msys64
188+
# so the find walks the full hostedtoolcache tree (no depth limit).
188189
- name: Hide msys64 from PATH (Windows)
189190
shell: bash
190191
run: |
191192
set -x
192193
[ -d /c/msys64 ] && mv /c/msys64 /c/__msys64 || true
193-
find /c/hostedtoolcache -maxdepth 5 -type d -name msys64 -print0 2>/dev/null \
194+
find /c/hostedtoolcache -type d -name msys64 -print0 2>/dev/null \
194195
| xargs -0 -I{} mv {} {}.__hidden || true
195196
where cmake || true
196197
if: startsWith(matrix.os, 'windows')

0 commit comments

Comments
 (0)