From 827b051fea818208dc5fcefcf2eb100d96f47293 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 22 Feb 2021 10:58:46 +0530 Subject: [PATCH] Sync brew params from v2 Add check for image constants --- src/scripts/darwin.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 79c12045..d0852f88 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -224,7 +224,7 @@ add_pecl() { # Function to update dependencies update_dependencies() { - if [ "$version" = '8.0' ]; then + if [ "$version" = '8.0' ] && [ "${ImageOS:-}" != "" ] && [ "${ImageVersion:-}" != "" ]; then while read -r formula; do curl -o "$brew_prefix/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/$formula.rb" "${curl_opts[@]}" "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/$formula.rb" & to_wait+=( $! ) @@ -263,6 +263,9 @@ brew_prefix="$(brew --prefix)" brew_repo="$(brew --repository)" tap_dir="$brew_repo"/Library/Taps existing_version=$(php-config --version 2>/dev/null | cut -c 1-3) +export HOMEBREW_CHANGE_ARCH_TO_ARM=1 +export HOMEBREW_NO_INSTALL_CLEANUP=1 +export HOMEBREW_NO_AUTO_UPDATE=1 # Setup PHP step_log "Setup PHP"