T209836: also do user check before git fetch.
@@ -6,10 +6,16 @@ then
source /etc/environment
fi
+# Load virtual environment to leverage the common sanity checks, not because we need python (we don't).
+if source ${TWLIGHT_HOME}/bin/virtualenv_activate.sh
+then
# Fetch latest code from ${TWLIGHT_GIT_REVISION}.
cd ${TWLIGHT_HOME}
git checkout .
git pull origin ${TWLIGHT_GIT_REVISION}
+else
+ exit 1
+fi
# Update pip dependencies.
bash ${TWLIGHT_HOME}/bin/virtualenv_pip_update.sh || exit 1
