Skip to content

Commit ed3c8ab

Browse files
committed
Fix bin/postgres for non-interactive use
1 parent 9a0770d commit ed3c8ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/postgres

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/bash
22

3-
docker compose exec -it postgres "$@"
3+
# If input is coming from a pipe or file, use -T to disable tty
4+
if [[ ! -t 0 ]]; then
5+
docker compose exec -T postgres "$@"
6+
else
7+
docker compose exec -it postgres "$@"
8+
fi

0 commit comments

Comments
 (0)