Only enable virtualenvwrapper, if WORKON_HOME is set
Makes sure that virtualenvwrapper is only enabled for those that really intend to use it.
This commit is contained in:
parent
7777a5856e
commit
e5f1788d1c
2 changed files with 7 additions and 5 deletions
|
@ -9,9 +9,9 @@ This module will prepend the per user site packages directory as defined in [PEP
|
|||
man pages installed into the per user site.
|
||||
|
||||
It also sources the [_virtualenvwrapper_][2] initialization script, if
|
||||
[_virtualenvwrapper_][2] is installed. [_virtualenvwrapper_][2] is a frontend
|
||||
to [_virtualenv_][3] which provides convenient shell functions to create, switch
|
||||
and manage virtualenvs.
|
||||
[_virtualenvwrapper_][2] is installed and `$WORKON_HOME` is set.
|
||||
[_virtualenvwrapper_][2] is a frontend to [_virtualenv_][3] which provides
|
||||
convenient shell functions to create, switch and manage virtualenvs.
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
|
|
@ -21,6 +21,8 @@ else
|
|||
fi
|
||||
|
||||
# source virtualenvwrapper if available
|
||||
if (( $+commands[virtualenvwrapper.sh] )); then
|
||||
source virtualenvwrapper.sh
|
||||
if (( $+WORKON_HOME )); then
|
||||
if (( $+commands[virtualenvwrapper.sh] )); then
|
||||
source virtualenvwrapper.sh
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue