Skip to content

Commit e52f3af

Browse files
committed
test
1 parent 82ddc7e commit e52f3af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/add-redirects.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ jobs:
8585
redirect='${prefix}/${version}'"$old"'/ -> ${base}/${version}/'
8686
8787
# if redirect not already in file, add to string to add to PR description
88-
if ! grep -q "$redirect" $REDIRECTS_FILE && [[ "$redirect" != *'${base}/${version}/' ]]; then
88+
escaped_redirect=$(printf '%s\n' "$redirect" | sed 's/[.[\*^$()+?{}|\\]/\\&/g')
89+
if ! grep -qE "${escaped_redirect}$" "$REDIRECTS_FILE"; then
8990
deleted_redirects+="<li>[&lt;v&gt;-*]: $redirect</li>"
9091
fi
9192
done

0 commit comments

Comments
 (0)