updated ci_bootstrap.sh

pull/2/head
Hari Sekhon 4 years ago
parent 2724f252fd
commit e023af1db0

@ -55,14 +55,15 @@ if [ "$(uname -s)" = Darwin ]; then
#retry "$srcdir/install_homebrew.sh"
if command -v brew 2>&1; then
# fix for CI runners on Mac with shallow homebrew clone - which is failing all the BuildKite builds
if [ -d /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core ]; then
git_root="/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
# find out if Homebrew is a shallow git checkout and if so fix it
if [ -f "$(git -C "$git_root" rev-parse --git-dir)/shallow" ] ||
[ "$(git -C "$git_root" rev-parse --is-shallow-repository)" = true ]; then
git -C "$git_root" fetch --unshallow
for git_root in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask; do
if [ -d "$git_root" ]; then
# find out if Homebrew is a shallow git checkout and if so fix it
if [ -f "$(git -C "$git_root" rev-parse --git-dir)/shallow" ] ||
[ "$(git -C "$git_root" rev-parse --is-shallow-repository)" = true ]; then
git -C "$git_root" fetch --unshallow
fi
fi
fi
done
retry brew update
fi
elif [ "$(uname -s)" = Linux ]; then

Loading…
Cancel
Save