| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
lychee cannot resolve links like /assets/img/foo.png without being told the repo root, so any changed file containing a pre-existing root-relative link fails the check even though the link is valid. Pass --root-dir . so lychee resolves these against the repo root. Observed in PR InnerSourceCommons#926, which failed on an unrelated pre-existing image link.
|
@rrrutledge thank you for fixing this issue in the GHA. I suspect we should apply the same fix to a similar GHA that runs once per week: I am doing that now. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Problem
The link checker workflow only lints files changed in a PR, specifically to avoid failing PRs on pre-existing issues unrelated to their content — the workflow's own top comment says so.
But it still checks every link in a changed file, not just the diff, so any pre-existing root-relative link (e.g. /assets/img/foo.png) in a touched file trips it, since lychee isn't told the repo root and can't resolve a path starting with /.
This surfaced in #926, which failed the check on a pre-existing image link in patterns/1-initial/internal-developer-platform.md that the PR never touched — it only added a "Known Instances" bullet elsewhere in the file.
Fix
Pass --root-dir . to lychee so root-relative links resolve against the repo root instead of failing outright.