From fae98913db0e32a70aa70a5149b2aee3aebe09d2 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 10 Mar 2024 08:15:16 +0000 Subject: [PATCH] Fix brew action We patch brew to ensure it overwrites files while linking the dependencies --- .github/actions/brew/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/brew/action.yml b/.github/actions/brew/action.yml index 51d37aa56d470..5868d3917b80c 100644 --- a/.github/actions/brew/action.yml +++ b/.github/actions/brew/action.yml @@ -5,6 +5,12 @@ runs: - shell: bash run: | set -x + + # Patch brew to overwrite always + formula_installer="$(brew --repo)"/Library/Homebrew/formula_installer.rb + code=" keg.link\(verbose: verbose\?" + sudo sed -Ei '' "s/$code.*/$code, overwrite: true\)/" "$formula_installer" + brew install \ pkg-config \ autoconf \