Skip to content

Commit 1400ce6

Browse files
committed
Run the psql functions with the username to allow non-super users to run commands
1 parent d40e90e commit 1400ce6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spryker/usr/local/share/spryker/spryker_functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ do_spryker_generate_files() {
104104
do_spryker_install() {
105105
# check if database exists (it is supposed to be created by postgres container)
106106
set +e
107-
psql -U "$DATABASE_USER" -h "$DATABASE_HOST" -lqt | cut -d \| -f 1 | grep -q "$DATABASE_NAME"
107+
psql -U "$DATABASE_USER" -h "$DATABASE_HOST" -lqt "$DATABASE_NAME" | cut -d \| -f 1 | grep -q "$DATABASE_NAME"
108108
DATABASE_EXISTS=$?
109109
set -e
110110

@@ -116,7 +116,7 @@ do_spryker_install() {
116116
# database exists
117117
# check if spryker is installed
118118
set +e
119-
psql -U "$DATABASE_USER" -h "$DATABASE_HOST" -c "SELECT EXISTS (SELECT * FROM information_schema.tables WHERE table_catalog = '$DATABASE_NAME' AND table_name = 'spy_locale');" | grep -q f
119+
psql -U "$DATABASE_USER" -h "$DATABASE_HOST" -c "SELECT EXISTS (SELECT * FROM information_schema.tables WHERE table_catalog = '$DATABASE_NAME' AND table_name = 'spy_locale');" "$DATABASE_NAME" | grep -q f
120120
SPRYKER_INSTALLED=$?
121121
set -e
122122

0 commit comments

Comments
 (0)