Skip to content

Commit 96ed730

Browse files
committed
Fix link checker false positives on root-relative asset links
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 #926, which failed on an unrelated pre-existing image link.
1 parent ab1fa17 commit 96ed730

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
name: Link Checker
4040
uses: lycheeverse/lychee-action@v2
4141
with:
42-
args: --verbose --no-progress --cache --max-cache-age 1d $MARKDOWN_FILES
42+
args: --verbose --no-progress --cache --max-cache-age 1d --root-dir . $MARKDOWN_FILES
4343
fail: true
4444
failIfEmpty: false
4545
jobSummary: true

0 commit comments

Comments
 (0)