From 2180a3124b0dce820ea4d96743dc5841e8f4ac6d Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Tue, 5 Mar 2019 11:33:24 +0000 Subject: [PATCH] Escape variable when running db provision Still fails at present - need to add step before running migrations --- provision/vm_provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision/vm_provision.sh b/provision/vm_provision.sh index ec28213d..0065a56c 100644 --- a/provision/vm_provision.sh +++ b/provision/vm_provision.sh @@ -87,7 +87,7 @@ su postgres -c "psql -c \"SELECT 1 FROM pg_database WHERE datname = 'vagrant';\" | grep -q 1 || su postgres -c "createdb -E UTF8 -T template0 --locale=en_US.utf8 -O vagrant vagrant" # Run all 'up' migrations to create tables, data types, indexes -su postgres -c "ls /vagrant/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql < $migration; done;" +su postgres -c "ls /vagrant/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql < \$migration; done;" #