Skip to content

Commit e857def

Browse files
committed
deploy: fix bogus link check for ../-style links
In 72d3f4f (ci(lychee): do detect incorrect `../` links, 2024-10-07), I introduced a somewhat complicated logic to detect bogus `../`-style links like the `link:../howto/maintain-git.txt` one introduced via Git v2.47.0. The main idea was to do introduce the step output `remap-dotdot` which would be only set in forks but not in the main repository. However, due to the buggy implementation, it would be set in the main repository, to: --remap '(http:/.*) file://../$1' ... which basically marked all http:// URLs as broken links. Let's fix that logic so that `remap-dotdot` _is_ empty in the main repository. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent a27ad42 commit e857def

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/deploy-to-github-pages/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ runs:
117117
# When running in forks, do detect when links try to break out of the
118118
# `/git-scm.com/` subdirectory
119119
echo "remap-dotdot=$(echo "$base_url" |
120-
sed 's|^\(.*\)\(/git-scm\.com\)$|--remap '\''(\1.*) file://../$1'\''|')" \
120+
sed -n 's|^\(https\?:\/\/.*\)\(/git-scm\.com\)$|--remap '\''(\1.*) file://../$1'\''|p')" \
121121
>>$GITHUB_OUTPUT
122122
123123
- name: check for broken links

0 commit comments

Comments
 (0)