-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.7.2
-
Component/s: Testing Infrastructure
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Prevent Python from being invoked without activating virtualenv first.
- command: expansions.update params: updates: - - key: activate_virtualenv + - key: python value: | # check if virtualenv is set up - if [ -d "${workdir}/venv" ]; then + if [ -d "${workdir}/venv" ] && [ -z $IN_VIRTUAL_ENV ]; then if [ "Windows_NT" = "$OS" ]; then # Need to quote the path on Windows to preserve the separator. . "${workdir}/venv/Scripts/activate" 2> /tmp/activate_error.log @@ -1805,10 +1776,12 @@ pre: echo "Failed to activate virtualenv: $(cat /tmp/activate_error.log)" fi python=python - else + IN_VIRTUAL_ENV=1 + echo "python set to $python" + elif [ -z $python ]; then python=${python|/opt/mongodbtoolchain/v2/bin/python2} fi - echo "python set to $(which python)" + $python \