From 1edf371d193036b192ccf8358e03625618ad153a Mon Sep 17 00:00:00 2001 From: Hongyuan Jia Date: Thu, 21 Mar 2024 09:32:38 +0800 Subject: [PATCH] chore(ci): fix brew install on macOS runner --- .github/workflows/R-CMD-check.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index dc5bf77..363c636 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -42,7 +42,12 @@ jobs: - name: Install mdbtools id: install-mdbtools-brew if: ${{ matrix.config.os == 'macos-latest' }} - run: brew install mdbtools + run: + # Unlink and re-link to prevent errors when GitHub mac runner images + # https://github.com/actions/setup-python/issues/577 + brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done + brew update + brew install mdbtools - name: Install mdbtools id: install-mdbtools-apt