File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -513,16 +513,17 @@ function rmvirtualenv {
513
513
do
514
514
echo " Removing $env_name ..."
515
515
typeset env_dir=" $WORKON_HOME /$env_name "
516
- if [ ! -d " $env_dir " ]; then
517
- echo " Cannot remove '$env_name '. No such environment." >&2
518
- fi
519
516
if [ " $VIRTUAL_ENV " = " $env_dir " ]
520
517
then
521
518
echo " ERROR: You cannot remove the active environment ('$env_name ')." >&2
522
519
echo " Either switch to another environment, or run 'deactivate'." >&2
523
520
return 1
524
521
fi
525
522
523
+ if [ ! -d " $env_dir " ]; then
524
+ echo " Cannot remove '$env_name '. No such environment." >&2
525
+ fi
526
+
526
527
# Move out of the current directory to one known to be
527
528
# safe, in case we are inside the environment somewhere.
528
529
typeset prior_dir=" $( pwd) "
You can’t perform that action at this time.
0 commit comments