[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
This commit is contained in:
ilia-shipitsin
2023-07-06 16:36:33 +02:00
committed by GitHub
parent 073c513015
commit 2b8425307d
2 changed files with 6 additions and 1 deletions

View File

@@ -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"

View File

@@ -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