Be paranoid about recursive removal

This commit is contained in:
2018-10-03 01:39:48 +08:00
parent cda30a7713
commit 243b707127

1
ghcup
View File

@@ -781,6 +781,7 @@ rm_ghc() {
[ ! -e "${f}" ] && [ ! -h "${f}" ] && die "Something went wrong, ${f} does not exist!"
edo rm "${f}"
done
[ -z "${inst_location}" ] && die "internal error: inst_location empty!"
edo rm -r "${inst_location}"
status_message "Successfully removed GHC ${myghcver}."