From 243b707127e4388bcf9f55290ec2d56cebb8c696 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 3 Oct 2018 01:39:48 +0800 Subject: [PATCH] Be paranoid about recursive removal --- ghcup | 1 + 1 file changed, 1 insertion(+) diff --git a/ghcup b/ghcup index b7f1a09..11c0162 100755 --- a/ghcup +++ b/ghcup @@ -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}."