Unverified Commit b4d94bf9 authored by Ulysses Zhan's avatar Ulysses Zhan
Browse files

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

parent eea616dd
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