Skip to content

Link check: don't let bash -e abort on lychee exit 2 - #535

Merged
Clare72 merged 1 commit into
masterfrom
fix-link-check-errexit
Nov 2, 2026
Merged

Clare72 merged 1 commit into
masterfrom
fix-link-check-errexit

Conversation

@Clare72

@Clare72 Clare72 commented Nov 2, 2026

Copy link
Copy Markdown

The weekly link check (run 41398797258) failed with exit code 2 and left no report.

GitHub Actions runs run: steps with bash -e, and set -uo pipefail doesn't turn that off. So when lychee exited 2 (broken links found), the step stopped before status=$?. The report was never added to the step summary, and the "Broken links report" issue step was skipped.

This change captures lychee's exit code with || status=$?. When there are broken links, the job now passes and opens or updates the issue, as intended. Any other non-zero exit still fails the job.

To check: a workflow_dispatch run on this branch should finish green and open or update the "Broken links report" issue with the current broken links.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Clare72
Clare72 merged commit c6905c6 into master Nov 2, 2026
1 check passed
@Clare72
Clare72 deleted the fix-link-check-errexit branch November 2, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant