Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47e8e38

Browse files
committed
Check if $VIRTUAL_ENV exists in frameworkpython alias
1 parent 18fc72a commit 47e8e38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

doc/faq/virtualenv_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Alternatively you can define an alias in your ``.bashrc`` using
120120

121121
.. code:: bash
122122
123-
alias frameworkpython='PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python'
123+
alias frameworkpython='[[ ! -z "$VIRTUAL_ENV" ]] && PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python || /usr/local/bin/python'
124124
125125
This alias can then be used in all of your virtualenvs without having to
126126
fix every single one of them.

0 commit comments

Comments
 (0)