From 73963f5001e335723c998e4a0125ce060083985c Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 25 Mar 2024 07:30:22 +0530 Subject: [PATCH] Uprade existing macOS version --- src/scripts/darwin.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 2e676091..32048b50 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -140,17 +140,6 @@ update_dependencies() { fi } -# Function to fix dependencies on install PHP version. -fix_dependencies() { - broken_deps_paths=$(php -v 2>&1 | grep -Eo '/opt/[a-zA-Z0-9@\.]+') - if [ "x$broken_deps_paths" != "x" ]; then - update_dependencies - IFS=" " read -r -a formulae <<< "$(echo "$broken_deps_paths" | tr '\n' ' ' | sed 's|/opt/||g' 2>&1)$php_formula" - brew reinstall "${formulae[@]}" - brew link --force --overwrite "$php_formula" || true - fi -} - # Function to get PHP version if it is already installed using Homebrew. get_brewed_php() { cellar="$brew_prefix"/Cellar @@ -232,8 +221,8 @@ setup_php() { add_php "upgrade" "$existing_version" >/dev/null 2>&1 status="Updated to" else - status="Found" - fix_dependencies >/dev/null 2>&1 + add_php "upgrade" "$existing_version" >/dev/null 2>&1 + status="Updated to" fi php_config="$(command -v php-config)" ext_dir="$(grep 'extension_dir=' "$php_config" | cut -d "'" -f 2)"