From fc14643b0a99ee9db10a3c025a33d76544fa3761 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 2 Jun 2024 23:04:56 +0530 Subject: [PATCH] Fix brew link step We add --overwrite parameter to brew install and upgrade commands, so that in the linking step it does not fail if another php version is linked --- src/scripts/darwin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index b22b6f09e..d4ef3f52c 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -164,9 +164,9 @@ add_php() { suffix="$(get_php_formula_suffix)" php_formula="shivammathur/php/php@$version$suffix" if [[ "$existing_version" != "false" && -z "$suffix" ]]; then - ([ "$action" = "upgrade" ] && brew upgrade -f "$php_formula") || brew unlink "$php_formula" + ([ "$action" = "upgrade" ] && brew upgrade -f --overwrite "$php_formula") || brew unlink "$php_formula" else - brew install -f "$php_formula" + brew install -f --overwrite "$php_formula" fi sudo chown -R "$(id -un)":"$(id -gn)" "$brew_prefix" brew link --force --overwrite "$php_formula"