summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Henkel <tobias.henkel@bmw.de>2020-04-06 20:07:24 +0200
committerTobias Henkel <tobias.henkel@bmw.de>2020-04-07 20:04:34 +0000
commita0844c4b56fc8451313e37194aac8be2fd647914 (patch)
tree14bd7aefa911abf836afb03cf9ce2d1f6ee47757
parent33fef37bc5f802a2f49858f32a4f0e92664215de (diff)
downloadzuul-a0844c4b56fc8451313e37194aac8be2fd647914.tar.gz
Retry nodeenv creation
We saw some failures while creating the nodeenv so add a retry there. Change-Id: I97d65a31a4d1170e3aa2dae730e6e52e47780c82
-rwxr-xr-xtools/pip.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/pip.sh b/tools/pip.sh
index 47b5027f7..8dda202d7 100755
--- a/tools/pip.sh
+++ b/tools/pip.sh
@@ -23,7 +23,15 @@ then
pip install nodeenv
# Initialize nodeenv and tell it to re-use the currently active virtualenv
# TODO(jeblair): remove node version pin. upath 1.0.4 objects to node >9.
- nodeenv --python-virtualenv -n 10.16.0
+ attempts=0
+ until nodeenv --python-virtualenv -n 10.16.0; do
+ ((attempts++))
+ if [[ $attempts > 2 ]]
+ then
+ echo "Failed creating nodeenv"
+ exit 1
+ fi
+ done
# 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.