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 () {
67
67
assertSame " $RC " " 1"
68
68
}
69
69
70
+ test_no_args () {
71
+ mkvirtualenv 2> /dev/null 1>&2
72
+ RC=$?
73
+ assertSame " 2" " $RC "
74
+ }
75
+
70
76
test_no_workon_home () {
71
77
old_home=" $WORKON_HOME "
72
78
export WORKON_HOME=" $WORKON_HOME /not_there"
Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ mkvirtualenv () {
197
197
virtualenv " $@ " &&
198
198
[ -d " $WORKON_HOME /$envname " ] && virtualenvwrapper_run_hook " pre_mkvirtualenv" " $envname "
199
199
)
200
+ typeset RC=$?
201
+ [ $RC -ne 0 ] && return $RC
200
202
# If they passed a help option or got an error from virtualenv,
201
203
# the environment won't exist. Use that to tell whether
202
204
# we should switch to the environment and run the hook.
You can’t perform that action at this time.
0 commit comments