Improved messages for uninstall (#1591)

This commit is contained in:
Varun Agrawal 2020-04-22 11:45:28 -04:00 committed by GitHub
parent c3e29f08b3
commit a8f5fc13ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,7 @@ if [ -z "$FORCE" ]; then
exit 1 exit 1
fi fi
read -p "pyenv: remove $PREFIX? " read -p "pyenv: remove $PREFIX? [y|N]"
case "$REPLY" in case "$REPLY" in
y | Y | yes | YES ) ;; y | Y | yes | YES ) ;;
* ) exit 1 ;; * ) exit 1 ;;
@ -81,6 +81,7 @@ for hook in "${before_hooks[@]}"; do eval "$hook"; done
if [ -d "$PREFIX" ]; then if [ -d "$PREFIX" ]; then
rm -rf "$PREFIX" rm -rf "$PREFIX"
pyenv-rehash pyenv-rehash
echo "pyenv: $VERSION_NAME uninstalled"
fi fi
for hook in "${after_hooks[@]}"; do eval "$hook"; done for hook in "${after_hooks[@]}"; do eval "$hook"; done

View File

@ -49,6 +49,7 @@ OUT
before: ${PYENV_ROOT}/versions/3.6.2 before: ${PYENV_ROOT}/versions/3.6.2
rm -rf ${PYENV_ROOT}/versions/3.6.2 rm -rf ${PYENV_ROOT}/versions/3.6.2
rehashed rehashed
pyenv: 3.6.2 uninstalled
after. after.
OUT OUT