mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-26 14:29:08 +01:00
quote and escape the DSN written to .env
This commit is contained in:
@@ -282,10 +282,10 @@ detect_postgres_depends_condition() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compose interpolates .env values, so a literal $ has to be written as $$.
|
|
||||||
env_value() {
|
env_value() {
|
||||||
local value="$1"
|
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() {
|
detect_compose_network() {
|
||||||
|
|||||||
Reference in New Issue
Block a user