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 fi
done done
# If no match was found, the user entered an invalid option # Check if we're done looping the menu
if [ "$matched" == "false" ]; then 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." echo -e "\nInvalid selection."
continue continue
else
# Match was found and actioned, so exit the menu
break
fi fi
done done
fi fi