Browse Source

Really retry yarn installs

The set -e was subverting the yarn retry loops in tools/pip.sh.

Change-Id: Ibee12479336670142fdc6733e744ab5273cb8c5b
changes/35/789935/2
James E. Blair 6 months ago
parent
commit
819bae3559
  1. 4
      tools/pip.sh

4
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}" ]]

Loading…
Cancel
Save