File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ test_no_virtualenv () {
6767 assertSame " $RC " " 1"
6868}
6969
70+ test_no_args () {
71+ mkvirtualenv 2> /dev/null 1>&2
72+ RC=$?
73+ assertSame " 2" " $RC "
74+ }
75+
7076test_no_workon_home () {
7177 old_home=" $WORKON_HOME "
7278 export WORKON_HOME=" $WORKON_HOME /not_there"
Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ mkvirtualenv () {
197197 virtualenv " $@ " &&
198198 [ -d " $WORKON_HOME /$envname " ] && virtualenvwrapper_run_hook " pre_mkvirtualenv" " $envname "
199199 )
200+ typeset RC=$?
201+ [ $RC -ne 0 ] && return $RC
200202 # If they passed a help option or got an error from virtualenv,
201203 # the environment won't exist. Use that to tell whether
202204 # we should switch to the environment and run the hook.
You can’t perform that action at this time.
0 commit comments