-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
download_queue: fail on checksum mismatch #21113
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
We want `fetch` to fail on an encounter of checksum mismatch, but it doesn't happen at that moment Closes #21106 Signed-off-by: botantony <[email protected]>
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.
Pull Request Overview
This PR makes fetch fail immediately on checksum mismatch by converting warnings to errors and adding an exit statement. Previously, checksum mismatches only set a warning and continued execution, which didn't properly fail the operation.
- Changed checksum mismatch handling from
opoo(warning) toofail(error) to setHomebrew.failed = true - Improved error message formatting with aligned output for expected and actual checksums
- Added
exit 1at the end offetchmethod to immediately fail when checksum errors occur
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
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.
Looks good to merge as-is but have some optional feedback if you want to tweak, thanks!
Signed-off-by: botantony <[email protected]>
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
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.
Looks great, thanks @botantony!
brew lgtm(style, typechecking and tests) with your changes locally?We want
fetchto fail on an encounter of checksum mismatch, but it doesn't happen at that momentCloses #21106