diff --git a/ghcup b/ghcup index 12b90bd..d911dd6 100755 --- a/ghcup +++ b/ghcup @@ -1657,8 +1657,10 @@ rm_ghc() { fi done unset t known_tools - # remove share directory - edo rm "${BIN_LOCATION}/../share" + # remove dangling symlink to share directory + if [ -h "${BIN_LOCATION}/../share" ] && [ ! -e "${BIN_LOCATION}/../share" ] ; then + edo rm "${BIN_LOCATION}/../share" + fi warning_message "Done." warning_message "You may now want to set currently active GHC to a different version via:"