Skip to content

Commit

Permalink
fix: full path for all variables
Browse files Browse the repository at this point in the history
  • Loading branch information
diksown committed Nov 16, 2023
1 parent 23eaf45 commit 9420032
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/run_sql_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ HOST="localhost"

FILES=("esquema.sql" "triggers.sql" "dados.sql" "consultas.sql")

for file in "sql/${FILES[@]}"
for file in "${FILES[@]}"
do
echo "Running $file..."
PGPASSWORD=postgres psql -d "$DATABASE_NAME" -U "$USER" -h "$HOST" -f "$file"
PGPASSWORD=postgres psql -d "$DATABASE_NAME" -U "$USER" -h "$HOST" -f "sql/$file"
if [ $? -ne 0 ]; then
echo "Error encountered running $file"
exit 1
Expand Down

0 comments on commit 9420032

Please sign in to comment.