From 894a279a2da7a7c767624715a142ec5f50893f11 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 30 Sep 2018 16:11:56 +0800 Subject: [PATCH] Improve error messages --- ghcup | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ghcup b/ghcup index 51ce2eb..e14bf71 100755 --- a/ghcup +++ b/ghcup @@ -707,9 +707,12 @@ rm_ghc() { done edo rm -r "${inst_location}" - status_message "Successfully removed GHC ${myghcver}, you might have to" - status_message "set the currently active GHC now to fix dangling symlinks:" - status_message " ghcup set " + status_message "Successfully removed GHC ${myghcver}." + + if [ ! -e "${BIN_LOCATION}"/ghc ] ; then + warning_message "Currently active GHC is a dangling symlink, run:" + warning_message " ghcup set " + fi else warning_message "${myghcver} doesn't appear to be installed, skipping" fi