Skip to content

Commit

Permalink
mac ci: try ignoring update failure (envoyproxy#13658)
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <asraa@google.com>
  • Loading branch information
asraa authored and lizan committed Oct 22, 2020
1 parent fe8e12e commit 20c221c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions ci/mac_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,23 @@ function install {
fi
}

if ! brew update; then
echo "Failed to update homebrew"
exit 1
function retry () {
local returns=1 i=1
while ((i<=HOMEBREW_RETRY_ATTEMPTS)); do
if "$@"; then
returns=0
break
else
sleep "$HOMEBREW_RETRY_INTERVAL";
((i++))
fi
done
return "$returns"
}

if ! retry brew update; then
# Do not exit early if update fails.
echo "Failed to update homebrew"
fi

DEPS="automake cmake coreutils go libtool wget ninja"
Expand Down

0 comments on commit 20c221c

Please sign in to comment.