From a8f5fc13ee1d7a41b5c722e58ac7ff4550bdf69f Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 22 Apr 2020 11:45:28 -0400 Subject: [PATCH] Improved messages for uninstall (#1591) --- plugins/python-build/bin/pyenv-uninstall | 3 ++- plugins/python-build/test/hooks.bats | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/python-build/bin/pyenv-uninstall b/plugins/python-build/bin/pyenv-uninstall index 91805454..50a90bc9 100755 --- a/plugins/python-build/bin/pyenv-uninstall +++ b/plugins/python-build/bin/pyenv-uninstall @@ -69,7 +69,7 @@ if [ -z "$FORCE" ]; then exit 1 fi - read -p "pyenv: remove $PREFIX? " + read -p "pyenv: remove $PREFIX? [y|N]" case "$REPLY" in y | Y | yes | YES ) ;; * ) exit 1 ;; @@ -81,6 +81,7 @@ for hook in "${before_hooks[@]}"; do eval "$hook"; done if [ -d "$PREFIX" ]; then rm -rf "$PREFIX" pyenv-rehash + echo "pyenv: $VERSION_NAME uninstalled" fi for hook in "${after_hooks[@]}"; do eval "$hook"; done diff --git a/plugins/python-build/test/hooks.bats b/plugins/python-build/test/hooks.bats index 28d07c48..4a1a2945 100644 --- a/plugins/python-build/test/hooks.bats +++ b/plugins/python-build/test/hooks.bats @@ -49,6 +49,7 @@ OUT before: ${PYENV_ROOT}/versions/3.6.2 rm -rf ${PYENV_ROOT}/versions/3.6.2 rehashed +pyenv: 3.6.2 uninstalled after. OUT