Use bulletproof vulcan logic, not dumb human logic

This commit is contained in:
the-sane 2020-09-07 21:34:21 -04:00 committed by GitHub
parent 2b15bb771f
commit 24b81ffa26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,13 +231,14 @@ menu() {
fi
done
# If no match was found, the user entered an invalid option
if [ "$matched" == "false" ]; then
echo -e "\nInvalid selection."
continue
else
# Check if we're done looping the menu
if [ "$matched" == "true" ]; then
# Match was found and actioned, so exit the menu
break
else
# If no match was found, the user entered an invalid option
echo -e "\nInvalid selection."
continue
fi
done
fi