File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -67,4 +67,11 @@ test_virtualenvwrapper_run_hook_permissions() {
67
67
assertSame " Errno 13] Permission denied" " $error "
68
68
}
69
69
70
+ test_virtualenvwrapper_run_hook_without_log_dir () {
71
+ old_log_dir=" $VIRTUALENVWRAPPER_LOG_DIR "
72
+ unset VIRTUALENVWRAPPER_LOG_DIR
73
+ assertFalse " virtualenvwrapper_run_hook initialize"
74
+ export VIRTUALENVWRAPPER_LOG_DIR=" $old_log_dir "
75
+ }
76
+
70
77
. " $test_dir /shunit2"
Original file line number Diff line number Diff line change @@ -133,6 +133,11 @@ virtualenvwrapper_run_hook () {
133
133
echo " ERROR: Could not create temporary file name. Make sure TMPDIR is set." 1>&2
134
134
return 1
135
135
fi
136
+ if [ -z " $VIRTUALENVWRAPPER_LOG_DIR " ]
137
+ then
138
+ echo " ERROR: VIRTUALENVWRAPPER_LOG_DIR is not set." 1>&2
139
+ return 1
140
+ fi
136
141
" $VIRTUALENVWRAPPER_PYTHON " -c ' from virtualenvwrapper.hook_loader import main; main()' $HOOK_VERBOSE_OPTION --script " $hook_script " " $@ "
137
142
result=$?
138
143
You can’t perform that action at this time.
0 commit comments