From 719039acb2c09475407bce889e074579f596af4b Mon Sep 17 00:00:00 2001 From: Luca Ferrari Date: Mon, 8 Apr 2024 09:21:08 +0200 Subject: [PATCH] [#70] Fix bug in running post-initdb script For some strange reason, the post-initdb script holding variable was named `PGENV_SCRIPT_INITDB` but in the configuration was searched for as `PGENV_SCRIPT_POSTINITDB`. Since the configuration generates the latter, I fixed the test in `pgenv_initdb()` to use `PGENV_SCRIPT_POSTINITDB`. Bumps the version number. Close #70 --- bin/pgenv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/pgenv b/bin/pgenv index 4acba78..272cc76 100755 --- a/bin/pgenv +++ b/bin/pgenv @@ -2,7 +2,7 @@ # # VERSION # -PGENV_VERSION="1.3.4" +PGENV_VERSION="1.3.5" # https://stackoverflow.com/a/19622569/79202 trap 'exit' ERR @@ -961,9 +961,9 @@ pgenv_initdb(){ $INITDB -D "$PG_DATA" "${PGENV_INITDB_OPTIONS[@]}" # if there is a post-initdb script to run, run it - if [ -x "$PGENV_SCRIPT_INITDB" ]; then - echo "Running post-initdb script [$PGENV_SCRIPT_INITDB]" - $PGENV_SCRIPT_INITDB "$PG_DATA" + if [ -x "$PGENV_SCRIPT_POSTINITDB" ]; then + echo "Running post-initdb script [$PGENV_SCRIPT_POSTINITDB]" + $PGENV_SCRIPT_POSTINITDB "$PG_DATA" fi else