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 {
513513 do
514514 echo " Removing $env_name ..."
515515 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
519516 if [ " $VIRTUAL_ENV " = " $env_dir " ]
520517 then
521518 echo " ERROR: You cannot remove the active environment ('$env_name ')." >&2
522519 echo " Either switch to another environment, or run 'deactivate'." >&2
523520 return 1
524521 fi
525522
523+ if [ ! -d " $env_dir " ]; then
524+ echo " Cannot remove '$env_name '. No such environment." >&2
525+ fi
526+
526527 # Move out of the current directory to one known to be
527528 # safe, in case we are inside the environment somewhere.
528529 typeset prior_dir=" $( pwd) "
You can’t perform that action at this time.
0 commit comments