From f2eaf2ef80d9bd89ca116e03b1144aa8bcc6c923 Mon Sep 17 00:00:00 2001 From: Re4zOon <9249934+Re4zOon@users.noreply.github.com> Date: Wed, 23 Jul 2025 23:59:25 +0200 Subject: [PATCH 1/3] Fix IFS parsing Due to the function being called from create_database, the IFS is already set to , If we then update IFS_ORG to IFS, we lose the original IFS globally. This is a dirty fix, should be improved properly, as its not reusable really (sorry, its midnight here, took two hours to find the reason :D). --- runtime/functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/functions b/runtime/functions index ffe3b43..783240a 100755 --- a/runtime/functions +++ b/runtime/functions @@ -318,13 +318,14 @@ load_extensions() { psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS unaccent;" >/dev/null 2>&1 fi - IFS_ORG=$IFS + + IFS_ORG2=$IFS IFS=, for extension in ${DB_EXTENSION}; do echo "‣ Loading ${extension} extension..." psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS ${extension};" >/dev/null 2>&1 done - IFS=$IFS_ORG + IFS=$IFS_ORG2 } create_database() { From 8365dc26cad0892550216e43398527210e066087 Mon Sep 17 00:00:00 2001 From: Re4zOon <9249934+Re4zOon@users.noreply.github.com> Date: Thu, 24 Jul 2025 00:07:56 +0200 Subject: [PATCH 2/3] remove empty line --- runtime/functions | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/functions b/runtime/functions index 783240a..99865b8 100755 --- a/runtime/functions +++ b/runtime/functions @@ -318,7 +318,6 @@ load_extensions() { psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS unaccent;" >/dev/null 2>&1 fi - IFS_ORG2=$IFS IFS=, for extension in ${DB_EXTENSION}; do From 6886474aa938622c41105d2a9419e869a329224d Mon Sep 17 00:00:00 2001 From: KIMURA Kazunori Date: Thu, 24 Jul 2025 18:23:20 +0900 Subject: [PATCH 3/3] Make temporary variable `IFS_ORG` function-local `IFS` is still global --- runtime/functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/functions b/runtime/functions index 99865b8..627feed 100755 --- a/runtime/functions +++ b/runtime/functions @@ -318,13 +318,13 @@ load_extensions() { psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS unaccent;" >/dev/null 2>&1 fi - IFS_ORG2=$IFS + local IFS_ORG=$IFS IFS=, for extension in ${DB_EXTENSION}; do echo "‣ Loading ${extension} extension..." psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS ${extension};" >/dev/null 2>&1 done - IFS=$IFS_ORG2 + IFS=$IFS_ORG } create_database() { @@ -334,7 +334,7 @@ create_database() { echo "INFO! Database cannot be created on a $REPLICATION_MODE node. Skipping..." ;; *) - IFS_ORG=$IFS + local IFS_ORG=$IFS IFS=, for database in ${DB_NAME}; do echo "Creating database: ${database}..."