markdown-link-check icon indicating copy to clipboard operation
markdown-link-check copied to clipboard

fix: return exit code 1 when dead links found

Open kt3k opened this issue 7 months ago • 1 comments

The CLI used to return exit code 1 when dead links found until version 3.12.2, but it changed to exit code 0 in this commit (This seems unintentional as the behavior change not mentioned)

This PR change the exit code back to the original (1) when there are dead links.

kt3k avatar May 06 '25 18:05 kt3k

cc @dudeofawesome cc @tcort

https://github.com/tcort/markdown-link-check/commit/d8f522b10d74b55e93a4677b9f1b9f0f314e94d6

BaseMax avatar May 06 '25 22:05 BaseMax

Hey folks, I'm also struggling with this regression where it returns 0 even when dead links are found. It seems like the failing tests have to do with the return code:

Screenshot 2025-07-02 at 10 06 08

@kt3k any clue if this is related to your change?

mieubrisse avatar Jul 02 '25 13:07 mieubrisse

pushed a potential fix https://github.com/tcort/markdown-link-check/pull/452/commits/f55187526ba5369d5864cee33f8b663706c336f1

kt3k avatar Jul 04 '25 04:07 kt3k

Thanks a ton @kt3k !

@WillGibson can we get the workflows run to see if this fixed the CI?

mieubrisse avatar Jul 04 '25 17:07 mieubrisse

@kt3k any chance you can fix the tests ?

smainil avatar Jul 22 '25 08:07 smainil

Hey, sorry for the delay. I updated the test cases to pass them on windows. Please run the CI again

(Note: I experimented the windows run in https://github.com/kt3k/markdown-link-check-clone/pull/1 )

kt3k avatar Sep 08 '25 05:09 kt3k

This is a critical fix, restoring functionality that makes markdown-link-check usable once again in unattended CI workflows.

Please review with priority and merge!

cc: @tcort @WillGibson @BaseMax @smainil

MikeMcC399 avatar Sep 21 '25 08:09 MikeMcC399

@tcort

You've cut a new release v3.14.0, however the critical fix in this PR was not merged and included.

Until this issue is fixed, markdown-link-check remains of very limited value in unattended CI workflows, since it always returns success, thus failing its primary duty of reporting link errors to the calling process if it finds any link errors.

Please take a look here and see if you could merge this PR soon and cut a new patch release to follow on from v3.14.0.

MikeMcC399 avatar Oct 11 '25 07:10 MikeMcC399

merged + published in v3.14.1

tcort avatar Oct 11 '25 16:10 tcort

@tcort - Thank you! Installed and now working perfectly again!

MikeMcC399 avatar Oct 11 '25 18:10 MikeMcC399