exit out w/ error message when pip fails

Change-Id: I36b0660b89d6fed4b30a6a496e38502af55a76c5
This commit is contained in:
Wes Hayutin 2018-04-13 08:47:48 -04:00
parent 05cce7bd24
commit 4ab8b78276
1 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ bootstrap () {
# want to be writing files to the usbkey itself, and I can not find a
# way to make setuptools not try to write the .eggs dir.
sed -i "s%os.curdir%\'$OPT_WORKDIR\'%" $OPT_WORKDIR/lib/python2.7/site-packages/setuptools/dist.py
python setup.py install egg_info --egg-base $OPT_WORKDIR
python setup.py install egg_info --egg-base $OPT_WORKDIR || { echo 'python setup.py install failed' ; exit 1; }
if [ -x "$ZUUL_CLONER" ] && [ ! -z "$ZUUL_BRANCH" ]; then
mkdir -p .tmp
EXTRAS_DIR=$(/bin/mktemp -d -p $(pwd)/.tmp)
@ -148,7 +148,7 @@ bootstrap () {
popd
fi
# Handle the case that pip is too old to use a cache-dir
pip install --no-cache-dir "${OPT_REQARGS[@]}"
pip install --no-cache-dir "${OPT_REQARGS[@]}" || { echo 'python setup.py install failed' ; exit 1; }
popd
)
# In order to do any filesystem operations on the system running ansible (if it has SELinux intalled)