nix: Show connection hints for postgrest-with-postgresql-xx on stdout

This allows running this together with postgrest-run --dump-schema and
piping the result into jq without syntax errors.
This commit is contained in:
Wolfgang Walther
2024-02-19 17:49:16 +01:00
parent 8ff9f3292e
commit 4a796e0758
+2 -2
View File
@@ -89,8 +89,8 @@ let
log "Creating a minimally privileged $PGUSER connection role..."
createuser "$PGUSER" -U postgres --host="$tmpdir/socket" --no-createdb --no-inherit --no-superuser --no-createrole --no-replication --login
echo "${commandName}: You can connect with: psql 'postgres:///$PGDATABASE?host=$tmpdir/socket' -U postgres"
echo "${commandName}: You can tail the logs with: tail -f $tmpdir/db.log"
>&2 echo "${commandName}: You can connect with: psql 'postgres:///$PGDATABASE?host=$tmpdir/socket' -U postgres"
>&2 echo "${commandName}: You can tail the logs with: tail -f $tmpdir/db.log"
fi
if test "$_arg_fixtures"; then