-
Notifications
You must be signed in to change notification settings - Fork 136
fix: return exit code 1 when dead links found #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @dudeofawesome |
|
|
||
| if (err) throw null; | ||
| else if (results.some((result) => result.status === 'dead')) return; | ||
| else if (results.some((result) => result.status === 'dead')) throw null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have enabled the workflows. I'm hoping a test will fail as a result of this change. If not, we should add one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I'll try to add some test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test cases dc70b82
|
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:
@kt3k any clue if this is related to your change? |
|
pushed a potential fix f551875 |
|
Thanks a ton @kt3k ! @WillGibson can we get the workflows run to see if this fixed the CI? |
|
@kt3k any chance you can fix the tests ? |
|
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 kt3k/markdown-link-check-clone#1 ) |
|
This is a critical fix, restoring functionality that makes Please review with priority and merge! |
|
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, 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. |
|
merged + published in v3.14.1 |
|
@tcort - Thank you! Installed and now working perfectly again! |

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.