Skip to content

Commit

Permalink
Return control to pyenv-uninstall in uninstall/envs.bash
Browse files Browse the repository at this point in the history
Fixes #320
  • Loading branch information
aiguofer committed Jul 21, 2019
1 parent 294f64f commit 8286880
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions etc/pyenv.d/uninstall/envs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
Expand All @@ -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
Expand All @@ -28,3 +26,4 @@ if [ -n "${DEFINITION}" ]; then
fi
fi
fi
FORCE=t

0 comments on commit 8286880

Please sign in to comment.