Skip to content

Commit

Permalink
Fix Mac tests by making an unshallow copy of Homebrew repos
Browse files Browse the repository at this point in the history
It seems that updating shallow Git clones is expensive, and as a result
Homebrew recently started refusing to update shallow clones (see
Homebrew/discussions#226). This commit
tries to fix the problem by making these repos into full clones before
running "brew update".

I also came across another error about there being a conflicting version
of pip3 in /usr/local. I suspect that is related to the other Python
binaries that the script has to delete, so I added pip3 to the list and
that seemed to solve the problem.
  • Loading branch information
acozzette committed Dec 23, 2020
1 parent 64dd751 commit 635156e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kokoro/macos/prepare_build_macos_rc
Expand Up @@ -37,10 +37,14 @@ sudo rm -rf \
sudo rm -rf \
/usr/local/bin/2to3* \
/usr/local/bin/idle3* \
/usr/local/bin/pip3 \
/usr/local/bin/pydoc3* \
/usr/local/bin/python3* \
/usr/local/bin/pyvenv*

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

brew update
brew upgrade

Expand Down

0 comments on commit 635156e

Please sign in to comment.