From 82868800e5d22b69a867db5e6d3bfd98fb80e4e4 Mon Sep 17 00:00:00 2001 From: Diego Fernandez Date: Sun, 21 Jul 2019 00:58:52 -0600 Subject: [PATCH] Return control to pyenv-uninstall in uninstall/envs.bash Fixes #320 --- etc/pyenv.d/uninstall/envs.bash | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/pyenv.d/uninstall/envs.bash b/etc/pyenv.d/uninstall/envs.bash index c3dc5dfe..21dc0154 100644 --- a/etc/pyenv.d/uninstall/envs.bash +++ b/etc/pyenv.d/uninstall/envs.bash @@ -5,8 +5,7 @@ resolve_link() { 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}}" @@ -15,8 +14,7 @@ if [ -n "${DEFINITION}" ]; then 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 @@ -28,3 +26,4 @@ if [ -n "${DEFINITION}" ]; then fi fi fi +FORCE=t