fix: Use -P pager=off in the psql commands. (#631)

This allows for non-interactive use and doesn't hang on the user
input in certain conditions, like when the command output is large.

Fixes #610
This commit is contained in:
Abhilash Raj
2023-06-19 20:04:03 -07:00
committed by GitHub
parent 0745e37f01
commit 244b73d0f2
3 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ function wait_for_postgres () {
# moving forward.
# TODO: Use python's psycopg2 module to do this in python instead of
# installing postgres-client in the image.
until psql $DATABASE_URL -c '\l'; do
until psql -P pager=off $DATABASE_URL -c '\l'; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done