mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-08 11:33:55 -05:00
Upgrade uninstall hook after pyenv/pyenv#2432 (#438)
This commit is contained in:
@@ -2,7 +2,8 @@ resolve_link() {
|
||||
$(type -p greadlink readlink | head -1) "$1"
|
||||
}
|
||||
|
||||
if [ -n "${DEFINITION}" ]; then
|
||||
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}"
|
||||
@@ -27,4 +28,7 @@ if [ -n "${DEFINITION}" ]; then
|
||||
shopt -u nullglob
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
before_uninstall "uninstall_related_virtual_env"
|
||||
|
||||
Reference in New Issue
Block a user