Skip to content

Commit

Permalink
Merge pull request #48514 from Expensify/blimpich-checkRedirectLinksF…
Browse files Browse the repository at this point in the history
…orDupes

add check for identical src and dest urls
  • Loading branch information
coleaeason authored Sep 4, 2024
2 parents 8040707 + dfe72bf commit a956db6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/verifyRedirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ while read -r line; do
SOURCE_URL=${LINE_PARTS[0]}
DEST_URL=${LINE_PARTS[1]}

# Make sure that the source and destination are not identical
if [[ "$SOURCE_URL" == "$DEST_URL" ]]; then
error "Source and destination URLs are identical: $SOURCE_URL"
exit 1
fi

# Make sure the format of the line is as expected.
if [[ "${#LINE_PARTS[@]}" -gt 2 ]]; then
error "Found a line with more than one comma: $line"
Expand Down

0 comments on commit a956db6

Please sign in to comment.