We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8b61a5 commit 4ce11e7Copy full SHA for 4ce11e7
1 file changed
virtualenvwrapper.sh
@@ -513,16 +513,17 @@ function rmvirtualenv {
513
do
514
echo "Removing $env_name..."
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
if [ "$VIRTUAL_ENV" = "$env_dir" ]
520
then
521
echo "ERROR: You cannot remove the active environment ('$env_name')." >&2
522
echo "Either switch to another environment, or run 'deactivate'." >&2
523
return 1
524
fi
525
+ if [ ! -d "$env_dir" ]; then
+ echo "Cannot remove '$env_name'. No such environment." >&2
+ fi
526
+
527
# Move out of the current directory to one known to be
528
# safe, in case we are inside the environment somewhere.
529
typeset prior_dir="$(pwd)"
0 commit comments