From 8718ca086e68b6e60eed708369b9af8290868e20 Mon Sep 17 00:00:00 2001
From: Daniel <daniel@harvey>
Date: Wed, 20 Feb 2019 15:46:18 +0100
Subject: [PATCH] FIX: Shell command quoting fixed.

---
 make_db | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/make_db b/make_db
index 41bf138..2d9b183 100755
--- a/make_db
+++ b/make_db
@@ -84,7 +84,7 @@ function grant() {
     if [[ "$1" == "--strict" ]] ; then
         for host in ${DATABASE_USER_HOST_LIST//,/ } ; do
             CMD="SELECT COUNT(*) FROM mysql.user WHERE user='${DATABASE_USER}' AND host='${host}';"
-		        [[ $SQL -s -N -e "$CMD" == 0 ]] || {
+		        [[ $(SQL -s -N -e "$CMD") == 0 ]] || {
                 echo "The user '${DATABASE_USER}@${host}' is already in the database."
                 echo "Please use another user or delete it, e.g. with"
                 echo "'mysql -u ${MYSQL_USER} -p -e \"DROP USER ${DATABASE_USER}@${host};\"'"
-- 
GitLab