mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-13 05:53:52 -05:00
cleanup pyenv virtualenv on ERR
also cleanup compatibility paths
This commit is contained in:
@@ -537,10 +537,11 @@ for hook in "${before_hooks[@]}"; do eval "$hook"; done
|
||||
|
||||
# Plan cleanup on unsuccessful installation.
|
||||
cleanup() {
|
||||
[[ -L "${COMPAT_VIRTUALENV_PATH}" ]] && rm "${COMPAT_VIRTUALENV_PATH}"
|
||||
[ -z "${PREFIX_EXISTS}" ] && rm -rf "$VIRTUALENV_PATH"
|
||||
}
|
||||
|
||||
trap cleanup SIGINT
|
||||
trap cleanup SIGINT ERR
|
||||
|
||||
# Invoke virtualenv and record exit status in $STATUS.
|
||||
STATUS=0
|
||||
|
||||
Reference in New Issue
Block a user