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() {
6767 assertSame " Errno 13] Permission denied" " $error "
6868}
6969
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+
7077. " $test_dir /shunit2"
Original file line number Diff line number Diff line change @@ -133,6 +133,11 @@ virtualenvwrapper_run_hook () {
133133 echo " ERROR: Could not create temporary file name. Make sure TMPDIR is set." 1>&2
134134 return 1
135135 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
136141 " $VIRTUALENVWRAPPER_PYTHON " -c ' from virtualenvwrapper.hook_loader import main; main()' $HOOK_VERBOSE_OPTION --script " $hook_script " " $@ "
137142 result=$?
138143
You can’t perform that action at this time.
0 commit comments