nixos/postgresql: escape initdbArgs

It doesn't look correct that this isn't the case already.
This commit is contained in:
Maximilian Bosch 2024-09-29 20:43:30 +02:00
parent 0e78dc369c
commit 11d1f8776c
No known key found for this signature in database
3 changed files with 6 additions and 3 deletions

View file

@ -7,6 +7,7 @@ let
concatStringsSep
const
elem
escapeShellArgs
filterAttrs
isString
literalExpression
@ -545,7 +546,7 @@ in
rm -f ${cfg.dataDir}/*.conf
# Initialise the database.
initdb -U ${cfg.superUser} ${concatStringsSep " " cfg.initdbArgs}
initdb -U ${cfg.superUser} ${escapeShellArgs cfg.initdbArgs}
# See postStart!
touch "${cfg.dataDir}/.first_startup"