Fix dangling GHC symlink check

This commit is contained in:
Julian Ospald 2018-10-27 16:41:23 +08:00
parent 34aa368e9b
commit f71bf2fd51
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 1 additions and 1 deletions

2
ghcup
View File

@ -917,7 +917,7 @@ rm_ghc() {
status_message "Successfully removed GHC ${myghcver}."
if [ ! -e "${BIN_LOCATION}"/ghc ] ; then
if [ -h "${BIN_LOCATION}/ghc" ] && [ ! -e "${BIN_LOCATION}/ghc" ] ; then
warning_message "Currently active GHC is a dangling symlink, removing..."
# TODO: known_tools is not very robust, but we want to avoid accidentially deleting