update-source-version: escape question mark in old url

This commit is contained in:
Ulysses Zhan
2025-05-14 12:56:02 -07:00
parent eea616ddbc
commit b4d94bf9ea

View File

@@ -230,7 +230,7 @@ if [[ -n "$newUrl" ]]; then
fi
# Escape regex metacharacter that are allowed in store path names
oldUrlEscaped=$(echo "$oldUrl" | sed -re 's|[${}.+]|\\&|g')
oldUrlEscaped=$(echo "$oldUrl" | sed -re 's|[${}.+?]|\\&|g')
sed -i.cmp "$nixFile" -re "s|\"$oldUrlEscaped\"|\"$newUrl\"|"
if cmp -s "$nixFile" "$nixFile.cmp"; then