Skip to content

Commit

Permalink
fix: Follow home_url redirects for bats review (#133)
Browse files Browse the repository at this point in the history
Ex: Nodejs `https://nodejs.org/` redirects to `https://nodejs.org/en/`, and does not initially respond with a 200 response. This might not be the best solution for all URL responses that could be considered valid.
  • Loading branch information
Jaryt authored Mar 15, 2022
1 parent 6923ba0 commit 4b90277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/review.bats
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ setup() {
if [[ "${SKIPPED_REVIEW_CHECKS[*]}" =~ "RC007" || "$HOME_URL" == "null" ]]; then
skip
fi
HTTP_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" --retry 5 --retry-delay 5 "$HOME_URL")
HTTP_RESPONSE=$(curl -s -L -o /dev/null -w "%{http_code}" --retry 5 --retry-delay 5 "$HOME_URL")
if [[ "$HTTP_RESPONSE" -ne 200 ]]; then
echo
echo "Home URL: \"$HOME_URL\" is not reachable."
Expand Down

0 comments on commit 4b90277

Please sign in to comment.