helpers-2.1: Fix mysqlshow regex to list existing databases

Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
This commit is contained in:
Salamandar 2024-06-19 14:53:55 +02:00 committed by GitHub
parent 8f8070983d
commit ec354d443d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -184,7 +184,7 @@ ynh_mysql_user_exists() {
# #
ynh_mysql_database_exists() { ynh_mysql_database_exists() {
local database=$1 local database=$1
mysqlshow | grep -q "^| $database " mysqlshow | grep -qE "^|\s+$database\s+|"
} }
# Drop a user # Drop a user