Commit c1683bd
aegis/crew/arnold
Fix exec_sql to use configured credentials instead of hardcoded defaults
The exec_sql function hardcoded PGPASSWORD=password and -U postgres
when connecting via psql. This caused init scripts in
/docker-entrypoint-initdb.d/ to silently fail when DOLTGRES_USER or
DOLTGRES_PASSWORD were set to custom values, because the postgres
user no longer exists.
Use the existing get_env_var helper to read DOLTGRES_USER/PASSWORD
(or POSTGRES_USER/PASSWORD), falling back to postgres/password only
when neither is set.
Fixes #23001 parent 0873c7e commit c1683bd
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | | - | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
103 | | - | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
0 commit comments