From c5689978928ff8366e82c04f649d6da2896d5c35 Mon Sep 17 00:00:00 2001 From: Oliver Ford Date: Fri, 15 Jul 2022 17:19:54 +0100 Subject: [PATCH] Error better using uninstall with latest-allowed --- libexec/tfenv-uninstall | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/tfenv-uninstall b/libexec/tfenv-uninstall index eb240e88..83289c85 100755 --- a/libexec/tfenv-uninstall +++ b/libexec/tfenv-uninstall @@ -93,6 +93,10 @@ if [[ "${version_requested}" =~ ^min-required$ ]]; then log 'error' 'min-required is an unsupported option for uninstall'; fi; +if [[ "${version_requested}" == latest-allowed ]]; then + log 'error' 'latest-allowed is an unsupported option for uninstall'; +fi; + if [[ "${version_requested}" =~ ^latest\:.*$ ]]; then version="${version_requested%%\:*}"; regex="${version_requested##*\:}";