From 2b8425307de2a466d00eef667967dd8a54d158d8 Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:36:33 +0200 Subject: [PATCH] [macos] add workaround for homebrew/core, homebrew/cask (#7866) it was found that "git clone --depth 1 .." followed by "brew tap.." actually works even if some git index accidently broken --- images/macos/provision/configuration/environment/bashrc | 1 - images/macos/provision/core/homebrew.sh | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/images/macos/provision/configuration/environment/bashrc b/images/macos/provision/configuration/environment/bashrc index 548820c2..22821260 100644 --- a/images/macos/provision/configuration/environment/bashrc +++ b/images/macos/provision/configuration/environment/bashrc @@ -25,7 +25,6 @@ export DOTNET_ROOT=$HOME/.dotnet export DOTNET_MULTILEVEL_LOOKUP=0 export HOMEBREW_NO_AUTO_UPDATE=1 -export HOMEBREW_NO_INSTALL_FROM_API=1 export HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS=3650 export HOMEBREW_CASK_OPTS="--no-quarantine" diff --git a/images/macos/provision/core/homebrew.sh b/images/macos/provision/core/homebrew.sh index 9dd91d00..7ae4aac2 100755 --- a/images/macos/provision/core/homebrew.sh +++ b/images/macos/provision/core/homebrew.sh @@ -8,6 +8,12 @@ echo "Installing Homebrew..." HOMEBREW_INSTALL_URL="https://raw.githubusercontent.com/Homebrew/install/master/install.sh" /bin/bash -c "$(curl -fsSL ${HOMEBREW_INSTALL_URL})" +git clone https://github.com/Homebrew/homebrew-cask $(brew --repository)/Library/Taps/homebrew/homebrew-cask --origin=origin --template= --config core.fsmonitor=false --depth 1 +git clone https://github.com/Homebrew/homebrew-core $(brew --repository)/Library/Taps/homebrew/homebrew-core --origin=origin --template= --config core.fsmonitor=false --depth 1 + +brew tap homebrew/cask +brew tap homebrew/core + if [[ $arch == "arm64" ]]; then /opt/homebrew/bin/brew update /opt/homebrew/bin/brew upgrade