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.
|
man pages installed into the per user site.
|
||||||
|
|
||||||
It also sources the [_virtualenvwrapper_][2] initialization script, if
|
It also sources the [_virtualenvwrapper_][2] initialization script, if
|
||||||
[_virtualenvwrapper_][2] is installed. [_virtualenvwrapper_][2] is a frontend
|
[_virtualenvwrapper_][2] is installed and `$WORKON_HOME` is set.
|
||||||
to [_virtualenv_][3] which provides convenient shell functions to create, switch
|
[_virtualenvwrapper_][2] is a frontend to [_virtualenv_][3] which provides
|
||||||
and manage virtualenvs.
|
convenient shell functions to create, switch and manage virtualenvs.
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -21,6 +21,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# source virtualenvwrapper if available
|
# source virtualenvwrapper if available
|
||||||
if (( $+commands[virtualenvwrapper.sh] )); then
|
if (( $+WORKON_HOME )); then
|
||||||
source virtualenvwrapper.sh
|
if (( $+commands[virtualenvwrapper.sh] )); then
|
||||||
|
source virtualenvwrapper.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue