mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 00:51:28 +02:00
quote and escape the DSN written to .env
This commit is contained in:
@@ -282,10 +282,10 @@ detect_postgres_depends_condition() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Compose interpolates .env values, so a literal $ has to be written as $$.
|
||||
env_value() {
|
||||
local value="$1"
|
||||
printf '%s' "$value" | sed 's/\$/$$/g'
|
||||
value=$(printf '%s' "$value" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/\$/$$/g')
|
||||
printf '"%s"' "$value"
|
||||
}
|
||||
|
||||
detect_compose_network() {
|
||||
|
||||
Reference in New Issue
Block a user