Add check to removal of link to share

This commit is contained in:
Jan Felix Langenbach 2019-12-03 23:34:06 +01:00
parent 71d4c2f054
commit e22ed9dbe2
1 changed files with 4 additions and 2 deletions

6
ghcup
View File

@ -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:"