Return control to pyenv-uninstall in uninstall/envs.bash (#321)

This commit is contained in:
Diego Fernández Giraldo
2022-10-12 13:36:52 -06:00
committed by GitHub
parent 177eb67af3
commit 633711a0bc

View File

@@ -6,8 +6,7 @@ uninstall_related_virtual_env() {
if [ -n "${DEFINITION}" ]; then
if [[ "${DEFINITION}" != "${DEFINITION%/envs/*}" ]]; then
# Uninstall virtualenv by long name
exec pyenv-virtualenv-delete ${FORCE+-f} "${DEFINITION}"
exit 128
pyenv-virtualenv-delete ${FORCE+-f} "${DEFINITION}"
else
VERSION_NAME="${VERSION_NAME:-${DEFINITION##*/}}"
PREFIX="${PREFIX:-${PYENV_ROOT}/versions/${VERSION_NAME}}"
@@ -16,8 +15,7 @@ uninstall_related_virtual_env() {
REAL_DEFINITION="${REAL_PREFIX#${PYENV_ROOT}/versions/}"
if [[ "${REAL_DEFINITION}" != "${REAL_DEFINITION%/envs/*}" ]]; then
# Uninstall virtualenv by short name
exec pyenv-virtualenv-delete ${FORCE+-f} "${REAL_DEFINITION}"
exit 128
pyenv-virtualenv-delete ${FORCE+-f} "${REAL_DEFINITION}"
fi
else
# Uninstall all virtualenvs inside `envs` directory too