Skip to content

Commit

Permalink
github/workflows: unlink macOS pkg-config if installed
Browse files Browse the repository at this point in the history
This works around an issue with recent Github CI runners where
Homebrew is in an intermediate state. This is where old pkg-config
is installed, yet pkg-config as a package has become an alias
for pkgconf, thus causing failures to automatically switch symlinks
from one to the other.

Ref: actions/runner-images#10984
  • Loading branch information
jeeb committed Nov 22, 2024
1 parent b6b6775 commit 244d8d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ jobs:
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print
brew unlink python && brew link --overwrite python
- name: Unlink pkg-config if the CI runner happens to have it already installed
run: |
find "$(brew config | grep HOMEBREW_PREFIX | cut -f 2- -d ' ')/bin" -lname '*/pkg-config@0*/*' -print -exec brew unlink pkg-config@0.29.2 \; -quit
- name: Change Xcode version
if: ${{ matrix.xcode != '' }}
run: |
Expand Down

0 comments on commit 244d8d1

Please sign in to comment.