From 4a796e0758ff1a0bd2795a6bcffa6699e55ae43b Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 19 Feb 2024 17:48:36 +0100 Subject: [PATCH] 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. --- nix/tools/withTools.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/tools/withTools.nix b/nix/tools/withTools.nix index 7efc5fff3..e5c32e690 100644 --- a/nix/tools/withTools.nix +++ b/nix/tools/withTools.nix @@ -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