From 0e05f26be6cc818e76af987c52a65d61740fca53 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 10 Mar 2024 07:41:24 -0700 Subject: [PATCH] Fix brew action (#13659) 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 \