nix: fix direnv hanging when starting postgres (#55156)

See related issues: https://github.com/direnv/direnv/issues/755,
https://discourse.nixos.org/t/devenv-sh-starting-postgres/24272/7,
https://github.com/shelljs/shelljs/issues/770

Long-standing issue where on first-boot, direnv wouldnt return to the
shell, forcing me to kill the shell and then cd into sg/sg again

## Test plan

NA/, nix stuff
This commit is contained in:
Noah S-C 2023-07-20 14:30:38 +01:00 committed by GitHub
parent 21c0d57774
commit bfd4cfbbce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,5 +31,5 @@ EOF
fi
if ! pg_isready --quiet; then
echo 'Starting postgresql database...'
pg_ctl start -l "$PGHOST/log"
pg_ctl start -l "$PGHOST/log" 3>&-
fi