You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
d3mondev
changed the title
check-html-links returning exit code 0 even when broken links are found
check-html-links returns exit code 0 even when broken links are found
Jun 25, 2021
2>&1 redirects stderr (the actual problems) to stdout. check-html-links writes all problems to stderr and we need stderr piped into grep to search for the ❌.
> /dev/null redirects the original stdin to /dev/null, eliminating it. Otherwise, due to buffering, the stats and progress information is interleaved with the error message. You can skip this if you want the extra output.
grep --context=1000 '❌' searches for the ❌ character and writes the surrounding 1000 lines of output. A bit overkill since there won't usually be that many, but not really a problem.
( ! ...) will run the grep command in a subshell and negate the result, which means the successful location of ❌ will turn into an error code from the command.
Hello,
Since version 0.2.0, check-html-links is not returning an exit code 1 when broken links are found. This is working properly in 0.1.2.
Repro steps assuming _site has broken links:
Thanks
The text was updated successfully, but these errors were encountered: