pw_env_setup: smarter checks for cipd auth
Only complain about not being logged into CIPD if we're actually
having trouble accessing things in CIPD.
Change-Id: I469aa0370572b1e596d99e691b21d6fa66a4f62e
diff --git a/bootstrap.sh b/bootstrap.sh
index 89e887b..c2b8028 100644
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -109,13 +109,18 @@
fi
fi
-. $SETUP_SH
+if [ -f $SETUP_SH ]; then
+ . $SETUP_SH
-if [ $_PW_IS_BOOTSTRAP -eq 0 ] && [ -z "$PW_ENVSETUP_QUIET" ]; then
- echo
- echo "To activate this environment in the future, run this in your terminal:"
- echo
- _pw_green " . activate.sh\n"
+ if [ $_PW_IS_BOOTSTRAP -eq 0 ] && [ -z "$PW_ENVSETUP_QUIET" ]; then
+ echo
+ echo "To activate this environment in the future, run this in your "
+ echo "terminal:"
+ echo
+ _pw_green " . activate.sh\n"
+ fi
+else
+ _pw_red "Error during bootstrap--see messages above."
fi
unset _PW_IS_BOOTSTRAP