We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba87337 commit a72073fCopy full SHA for a72073f
.github/workflows/add-redirects.yml
@@ -83,10 +83,12 @@ jobs:
83
old="${old%.txt}"
84
85
redirect='${prefix}/${version}'"$old"'/ -> ${base}/${version}/'
86
-
87
- # if redirect not already in file, add to string to add to PR description
+
+ # escape special characters before searching for string
88
escaped_redirect=$(printf '%s\n' "$redirect" | sed 's/[[*${}|\\]/\\&/g')
89
- if ! grep -qE "${escaped_redirect}$" "$REDIRECTS_FILE"; then
90
+ # if redirect not already in file, add to string to add to PR description
91
+ if ! grep -qE "${escaped_redirect}$" $REDIRECTS_FILE; then
92
deleted_redirects+="<li>[<v>-*]: $redirect</li>"
93
fi
94
done
0 commit comments