fix: escape slashes in environment variable values during update (#8081)

This commit is contained in:
Krzysztof Dąbrowski 2025-11-11 13:22:03 +01:00 committed by GitHub
parent da22c2f670
commit 6ba15545d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,6 +141,7 @@ function updateEnvFile() {
value=$(echo "$value" | sed 's/|/\\|/g')
sed -i '' "s|^$key=.*|$key=$value|g" "$file"
else
value=$(echo "$value" | sed 's/\//\\\//g')
sed -i "s/^$key=.*/$key=$value/g" "$file"
fi
fi