Unverified Commit 4f796385 authored by Audrey Dutcher's avatar Audrey Dutcher Committed by GitHub
Browse files

update-source-version: escape question mark in old url (#407147)

parents 165e66ac b4d94bf9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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