Commit ff18f380 authored by Chris Rebert's avatar Chris Rebert
Browse files

Add retries to uncached-npm-install.sh

Pull requests are frequently failing on Travis due to npm flakiness
(I think) travis_retry isn't available in indirect subshells like this
parent 559f1657
5 merge requests!28721Hot test,!14396Add retries to uncached-npm-install.sh,!16605Test pull please ignore,!22103test,!25326Adjust examples
Showing with 10 additions and 1 deletion
+10 -1
......@@ -2,5 +2,14 @@
set -e
cd .. # /bootstrap/
cp test-infra/npm-shrinkwrap.json npm-shrinkwrap.json
npm install
# npm is flaky, so try multiple times
MAXTRIES=3
TRIES=1
while ! npm install; do
if [ $TRIES -ge $MAXTRIES ]; then
exit 1
fi
TRIES=$(($TRIES + 1))
echo "Retrying npm install (Try $TRIES of $MAXTRIES)..."
done
rm npm-shrinkwrap.json
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment