|
56 | 56 | VIRTUALENVWRAPPER_VIRTUALENV="virtualenv" |
57 | 57 | fi |
58 | 58 |
|
59 | | -# Set the location of the hook scripts |
60 | | -if [ "$VIRTUALENVWRAPPER_HOOK_DIR" = "" ] |
61 | | -then |
62 | | - export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME" |
63 | | -fi |
64 | | - |
65 | | -# Set the location of the hook script logs |
66 | | -if [ "$VIRTUALENVWRAPPER_LOG_DIR" = "" ] |
67 | | -then |
68 | | - export VIRTUALENVWRAPPER_LOG_DIR="$WORKON_HOME" |
69 | | -fi |
70 | | - |
71 | 59 | virtualenvwrapper_derive_workon_home() { |
72 | 60 | typeset workon_home_dir="$WORKON_HOME" |
73 | 61 |
|
@@ -108,7 +96,7 @@ virtualenvwrapper_derive_workon_home() { |
108 | 96 | # and maybe other things rely on the dir existing before that happens. |
109 | 97 | virtualenvwrapper_verify_workon_home () { |
110 | 98 | RC=0 |
111 | | - if [ ! -d "$WORKON_HOME" ] |
| 99 | + if [ ! -d "$WORKON_HOME/" ] |
112 | 100 | then |
113 | 101 | if [ "$1" != "-q" ] |
114 | 102 | then |
@@ -164,7 +152,21 @@ virtualenvwrapper_run_hook () { |
164 | 152 | # Set up virtualenvwrapper properly |
165 | 153 | virtualenvwrapper_initialize () { |
166 | 154 | export WORKON_HOME="$(virtualenvwrapper_derive_workon_home)" |
| 155 | + |
167 | 156 | virtualenvwrapper_verify_workon_home -q || return 1 |
| 157 | + |
| 158 | + # Set the location of the hook scripts |
| 159 | + if [ "$VIRTUALENVWRAPPER_HOOK_DIR" = "" ] |
| 160 | + then |
| 161 | + export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME" |
| 162 | + fi |
| 163 | + |
| 164 | + # Set the location of the hook script logs |
| 165 | + if [ "$VIRTUALENVWRAPPER_LOG_DIR" = "" ] |
| 166 | + then |
| 167 | + export VIRTUALENVWRAPPER_LOG_DIR="$WORKON_HOME" |
| 168 | + fi |
| 169 | + |
168 | 170 | virtualenvwrapper_run_hook "initialize" |
169 | 171 | if [ $? -ne 0 ] |
170 | 172 | then |
|
0 commit comments