Skip to content

fix: clarify misleading SHA mismatch error message#209

Merged
erikian merged 1 commit into
mainfrom
fix/misleading-sha-error-message
Jun 28, 2026
Merged

fix: clarify misleading SHA mismatch error message#209
erikian merged 1 commit into
mainfrom
fix/misleading-sha-error-message

Conversation

@claude

@claude claude Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

This reword fixes the misleading error message reported in #103.

Before: when a file's SHA differed between the x64 and arm64 builds, the error read:

Expected all non-binary files to have identical SHAs when creating a universal build but "" did not

The phrase "non-binary files" is inaccurate. As the issue notes, the scope of this check widened over time. The loop only iterates over AppFileType.PLAIN files — the catch-all category for anything that is not a Mach-O binary, a .bin V8 snapshot, an Info.plist, or an ASAR archive. A PLAIN file can still contain binary data, so "non-binary" misdescribes what is actually compared.

After: the message now names the actual set of files the check covers:

Expected all plain files (those that are not Mach-O binaries, V8 snapshots, Info.plist files, or ASAR archives) to have identical SHAs when creating a universal build but "" did not

How: the SHA-equality loop in src/index.ts is already correctly scoped (multiArchFiles.filter((f) => f.type === AppFileType.PLAIN)), so no behavior change was needed — only the error string was reworded to match what the code does. This is a one-line change.

Fixes #103


Generated by Claude Code

The error thrown when plain files have mismatched SHAs claimed it
covered all "non-binary files", but the check only iterates over
AppFileType.PLAIN files. Reword the message to accurately describe
the files actually compared.

Fixes #103
@MarshallOfSound MarshallOfSound marked this pull request as ready for review June 28, 2026 04:50
@MarshallOfSound MarshallOfSound requested a review from a team as a code owner June 28, 2026 04:50
@erikian erikian merged commit d44045b into main Jun 28, 2026
7 checks passed
@erikian erikian deleted the fix/misleading-sha-error-message branch June 28, 2026 16:13
@electron-npm-package-publisher

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading error message for file count mismatch

3 participants