Improve message when no GHC is installed

This commit is contained in:
Julian Ospald 2018-10-01 12:28:24 +08:00
parent 7d9631c7e4
commit ba80c6e409
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

6
ghcup
View File

@ -720,8 +720,12 @@ show_ghc() {
echo "Installed GHCs:" echo "Installed GHCs:"
for i in "${GHC_LOCATION}"/* ; do for i in "${GHC_LOCATION}"/* ; do
[ -e "${i}" ] || die "Something went wrong, ${i} does not exist!" if [ -e "${i}" ] ; then
echo " $(basename "${i}")" echo " $(basename "${i}")"
else # directory is empty
echo " None"
exit 0
fi
done done
if [ -n "${current_ghc}" ] ; then if [ -n "${current_ghc}" ] ; then