Skip to content

Conversation

@botantony
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

We want fetch to fail on an encounter of checksum mismatch, but it doesn't happen at that moment

Closes #21106

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]>
Copilot AI review requested due to automatic review settings November 19, 2025 14:38
Copilot finished reviewing on behalf of botantony November 19, 2025 14:41
Copy link
Contributor

Copilot AI left a 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) to ofail (error) to set Homebrew.failed = true
  • Improved error message formatting with aligned output for expected and actual checksums
  • Added exit 1 at the end of fetch method to immediately fail when checksum errors occur

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@botantony botantony marked this pull request as draft November 19, 2025 15:00
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a 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!

@botantony botantony marked this pull request as ready for review November 19, 2025 17:28
Copilot AI review requested due to automatic review settings November 19, 2025 17:28
Copilot finished reviewing on behalf of botantony November 19, 2025 17:33
Copy link
Contributor

Copilot AI left a 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.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a 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!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 20, 2025
Merged via the queue into main with commit fbfdbab Nov 20, 2025
43 checks passed
@MikeMcQuaid MikeMcQuaid deleted the fail-when-checksum-mismatch branch November 20, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent download: source checksum mismatch not failing fetch/install

3 participants