electron / universal

Create Universal macOS applications from two x64 and arm64 Electron applications
MIT License
112 stars 43 forks source link

Misleading error message for file count mismatch #103

Open erickzhao opened 1 month ago

erickzhao commented 1 month ago

The initial implementation for this library (163f495b6b3622b875c9b7c1de5e2987902f767b) threw an error if the count of Mach-O files was different between .app bundles.

https://github.com/electron/universal/blob/163f495b6b3622b875c9b7c1de5e2987902f767b/src/index.ts#L150

In (46ff9c4b38520e2ba6afdc4e18440b3c25d6bc72), the scope of this check was widened to account for any file that wasn't an app.asar archive or a .bin V8 snapshot.

https://github.com/electron/universal/blob/46ff9c4b38520e2ba6afdc4e18440b3c25d6bc72/src/index.ts#L110

However, the initial error message has not changed, which can be misleading for users encountering it.

I'm not sure if we only care about Mach-O files here and should also filter out AppFileType.PLAIN files in this check, or if the error message should be clarified instead.