We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 201ed58 commit e7c988eCopy full SHA for e7c988e
2 files changed
tests/test_mkvirtualenv.sh
@@ -67,6 +67,12 @@ test_no_virtualenv () {
67
assertSame "$RC" "1"
68
}
69
70
+test_no_args () {
71
+ mkvirtualenv 2>/dev/null 1>&2
72
+ RC=$?
73
+ assertSame "2" "$RC"
74
+}
75
+
76
test_no_workon_home () {
77
old_home="$WORKON_HOME"
78
export WORKON_HOME="$WORKON_HOME/not_there"
virtualenvwrapper.sh
@@ -197,6 +197,8 @@ mkvirtualenv () {
197
virtualenv "$@" &&
198
[ -d "$WORKON_HOME/$envname" ] && virtualenvwrapper_run_hook "pre_mkvirtualenv" "$envname"
199
)
200
+ typeset RC=$?
201
+ [ $RC -ne 0 ] && return $RC
202
# If they passed a help option or got an error from virtualenv,
203
# the environment won't exist. Use that to tell whether
204
# we should switch to the environment and run the hook.
0 commit comments