From 819bae35590cca749e60c52d5bb81032f1a51a8c Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 5 May 2021 11:58:03 -0700 Subject: [PATCH] Really retry yarn installs The set -e was subverting the yarn retry loops in tools/pip.sh. Change-Id: Ibee12479336670142fdc6733e744ab5273cb8c5b --- tools/pip.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/pip.sh b/tools/pip.sh index ddcc12d26e..eef5276a47 100755 --- a/tools/pip.sh +++ b/tools/pip.sh @@ -23,6 +23,7 @@ then pip install nodeenv # Initialize nodeenv and tell it to re-use the currently active virtualenv attempts=0 + set +e until nodeenv --python-virtualenv -n 14.3.0 ; do ((attempts++)) if [[ $attempts > 2 ]] @@ -31,6 +32,7 @@ then exit 1 fi done + set -e # Use -g because inside of the virtualenv '-g' means 'install into the' # virtualenv - as opposed to installing into the local node_modules. # Avoid writing a package-lock.json file since we don't use it. @@ -50,6 +52,7 @@ then # Be forgiving of package retrieval errors attempts=0 + set +e until yarn install --verbose; do ((attempts++)) if [[ $attempts > 2 ]] @@ -58,6 +61,7 @@ then exit 1 fi done + set -e yarn build if [[ -n "${YARN_REGISTRY}" ]]