fix(db-tool): postgres-init: always invoke main so sourcing exports vars
Previous basename guard only ran the function when invoked as the postgres-init binary, but consumer shellHooks source the script to inherit POSTGRESQL_HOST/PGURL/etc. Sourcing left the function defined but never called, leaving WIPE_PGURL/PGURL unset and breaking devshell entry in proxydoe and ruststats.
This commit is contained in:
@@ -44,6 +44,4 @@ postgres_init_main() {
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ "$(basename "$0")" = 'postgres-init' ]; then
|
||||
postgres_init_main "$@"
|
||||
fi
|
||||
postgres_init_main "$@"
|
||||
|
||||
Reference in New Issue
Block a user