mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 21:06:16 +00:00
postgresql-init-dev-db: Fix string quotes.
The previous version of the script did not quote VAGRANTUSERNAME, which caused an error when running the script if the username contained `-` or other characters that affect the Postgres syntax. Fix this using double-quotes.
This commit is contained in:
@@ -75,12 +75,12 @@ ALTER USER $USERNAME CREATEDB;
|
|||||||
ALTER ROLE $USERNAME SET search_path TO $SEARCH_PATH;
|
ALTER ROLE $USERNAME SET search_path TO $SEARCH_PATH;
|
||||||
|
|
||||||
DO \$\$BEGIN
|
DO \$\$BEGIN
|
||||||
CREATE USER $VAGRANTUSERNAME;
|
CREATE USER "$VAGRANTUSERNAME";
|
||||||
EXCEPTION WHEN duplicate_object THEN
|
EXCEPTION WHEN duplicate_object THEN
|
||||||
RAISE NOTICE '$VAGRANTUSERNAME user already exists';
|
RAISE NOTICE '$VAGRANTUSERNAME user already exists';
|
||||||
END\$\$;
|
END\$\$;
|
||||||
GRANT $USERNAME TO $VAGRANTUSERNAME;
|
GRANT $USERNAME TO "$VAGRANTUSERNAME";
|
||||||
ALTER ROLE $VAGRANTUSERNAME SET search_path TO $SEARCH_PATH;
|
ALTER ROLE "$VAGRANTUSERNAME" SET search_path TO $SEARCH_PATH;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
umask go-rw
|
umask go-rw
|
||||||
|
|||||||
Reference in New Issue
Block a user