Skip to content

Commit f743036

Browse files
committed
WIP
1 parent e219e66 commit f743036

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/broken-link-checker.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ jobs:
7979
verify_with_curl() {
8080
local url="$1"
8181
echo " 🔄 Verifying: $url"
82+
echo " → Full curl output for $url:"
8283
83-
http_code=$(curl -L -s -o /dev/null -w "%{http_code}" \
84+
curl -L -v -o /dev/null -w "\nFINAL_HTTP_CODE: %{http_code}\n" \
8485
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \
8586
--connect-timeout 30 --max-time 60 --insecure \
8687
--retry 3 --retry-delay 5 --retry-all-errors \
87-
"$url" 2>/dev/null || echo "000")
88+
"$url" 2>&1 | tee /tmp/curl_debug.txt
89+
90+
http_code=$(grep "FINAL_HTTP_CODE:" /tmp/curl_debug.txt | cut -d: -f2 | tr -d ' ' || echo "000")
91+
echo " → Extracted code: $http_code"
8892
8993
if echo "$http_code" | grep -E "^(200|301|302|303)$" > /dev/null; then
9094
echo " ✅ Success: HTTP $http_code"

0 commit comments

Comments
 (0)