mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-15 06:53:52 -05:00
Exit as error on deactivation failures
This commit is contained in:
@@ -30,6 +30,9 @@ fish )
|
||||
cat <<EOS
|
||||
setenv PYENV_DEACTIVATE "\$VIRTUAL_ENV";
|
||||
deactivate;
|
||||
else
|
||||
echo "pyenv-virtualenv: no virtualenv has been activated." 1>&2;
|
||||
false;
|
||||
end;
|
||||
EOS
|
||||
;;
|
||||
@@ -37,6 +40,9 @@ EOS
|
||||
cat <<EOS
|
||||
export PYENV_DEACTIVATE="\$VIRTUAL_ENV";
|
||||
deactivate;
|
||||
else
|
||||
echo "pyenv-virtualenv: no virtualenv has been activated." 1>&2;
|
||||
false;
|
||||
fi;
|
||||
EOS
|
||||
;;
|
||||
|
||||
@@ -16,6 +16,9 @@ setup() {
|
||||
if declare -f deactivate 1>/dev/null 2>&1; then
|
||||
export PYENV_DEACTIVATE="\$VIRTUAL_ENV";
|
||||
deactivate;
|
||||
else
|
||||
echo "pyenv-virtualenv: no virtualenv has been activated." 1>&2;
|
||||
false;
|
||||
fi;
|
||||
EOS
|
||||
}
|
||||
@@ -31,6 +34,9 @@ if declare -f deactivate 1>/dev/null 2>&1; then
|
||||
pyenv shell --unset;
|
||||
export PYENV_DEACTIVATE="\$VIRTUAL_ENV";
|
||||
deactivate;
|
||||
else
|
||||
echo "pyenv-virtualenv: no virtualenv has been activated." 1>&2;
|
||||
false;
|
||||
fi;
|
||||
EOS
|
||||
}
|
||||
@@ -45,6 +51,9 @@ EOS
|
||||
if functions -q deactivate
|
||||
setenv PYENV_DEACTIVATE "\$VIRTUAL_ENV";
|
||||
deactivate;
|
||||
else
|
||||
echo "pyenv-virtualenv: no virtualenv has been activated." 1>&2;
|
||||
false;
|
||||
end;
|
||||
EOS
|
||||
}
|
||||
@@ -60,6 +69,9 @@ if functions -q deactivate
|
||||
pyenv shell --unset;
|
||||
setenv PYENV_DEACTIVATE "\$VIRTUAL_ENV";
|
||||
deactivate;
|
||||
else
|
||||
echo "pyenv-virtualenv: no virtualenv has been activated." 1>&2;
|
||||
false;
|
||||
end;
|
||||
EOS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user