From 60bd49fa62b84d134e30f2d80a8cdebc420f659d Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 17 Aug 2021 13:38:31 +0200 Subject: [PATCH] Fix bad logic Before the formatting, the check was useless. The fixes from the formatting/linting PR messed the logic. --- install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install b/install index f7922f9da..055abe74d 100755 --- a/install +++ b/install @@ -583,10 +583,12 @@ while :; do shift done -if [[ -z $web_root || ! -d $web_root ]]; then - echo "$web_root doesn't exist!" +# If web_root is given, check that it exists +if [[ -n $web_root && ! -d $web_root ]]; then + echo "$web_root directory not found!" exit 1 fi + echo -e "\n.____ ._____. ___________.__ " echo "| | |__\_ |_________ ___\__ ___/|__| _____ ____ " echo "| | | || __ \_ __ \_/ __ \| | | |/ \_/ __ \ "