Skip to content

Commit 6886474

Browse files
committed
Make temporary variable IFS_ORG function-local
`IFS` is still global
1 parent 8365dc2 commit 6886474

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

runtime/functions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ load_extensions() {
318318
psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS unaccent;" >/dev/null 2>&1
319319
fi
320320

321-
IFS_ORG2=$IFS
321+
local IFS_ORG=$IFS
322322
IFS=,
323323
for extension in ${DB_EXTENSION}; do
324324
echo "‣ Loading ${extension} extension..."
325325
psql -U ${PG_USER} -d ${database} -c "CREATE EXTENSION IF NOT EXISTS ${extension};" >/dev/null 2>&1
326326
done
327-
IFS=$IFS_ORG2
327+
IFS=$IFS_ORG
328328
}
329329

330330
create_database() {
@@ -334,7 +334,7 @@ create_database() {
334334
echo "INFO! Database cannot be created on a $REPLICATION_MODE node. Skipping..."
335335
;;
336336
*)
337-
IFS_ORG=$IFS
337+
local IFS_ORG=$IFS
338338
IFS=,
339339
for database in ${DB_NAME}; do
340340
echo "Creating database: ${database}..."

0 commit comments

Comments
 (0)