Be paranoid about recursive removal

This commit is contained in:
Julian Ospald 2018-10-03 01:39:48 +08:00
parent cda30a7713
commit 243b707127
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

1
ghcup
View File

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