From a3c6bb2a32d82eed69a364b0c33be1159e39880d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 6 Nov 2026 11:17:22 +0000 Subject: [PATCH] build: fix macOS CI failing when the runner image has no homebrew/core tap Newer Homebrew makes 'brew untap --force' fail with 'No available tap' if the tap isn't installed. Whether homebrew/core is tapped varies between macOS runner images, so the mac_arm64 and mac_amd64 jobs were failing intermittently. Only untap the taps which are present. --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3dbbc7b8..fb8398bd8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,9 +177,12 @@ jobs: # https://github.com/Homebrew/brew/issues/15621#issuecomment-1619266788 # https://github.com/orgs/Homebrew/discussions/4612#discussioncomment-6319008 unset HOMEBREW_NO_INSTALL_FROM_API - brew untap --force homebrew/core - brew untap --force homebrew/cask - brew untap --force aws/tap + # brew untap fails if the tap isn't installed, which varies between runner images + for tap in homebrew/core homebrew/cask aws/tap; do + if brew tap | grep -qx "$tap"; then + brew untap --force "$tap" + fi + done brew update brew install --cask macfuse brew install git-annex git-annex-remote-rclone