electron / universal

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

fix: ignore errors produced by /usr/bin/file #13

Closed erkyrath closed 3 years ago

erkyrath commented 3 years ago

/usr/bin/file can return errors on MacOS. Honest! I ran into this with a .wasm file in my project:

% /usr/bin/file emglken/glulxe-core.wasm 
emglken/glulxe-core.wasm: ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)

file exits with a nonzero error code, and therefore the makeUniversalApp() call fails.

This patch catches that case and swallows the error, effectively treating those files as unrecognized types -- thus PLAIN.

zvin commented 3 years ago

This is due to https://bugs.astron.com/view.php?id=170 Build and install file from https://github.com/file/file master, the issue is fixed there.

jtbandes commented 3 years ago

I'm interested in this fix too. @MarshallOfSound sorry for a random ping, but it looks like you're a big contributor here – do you think it would be possible to merge this fix (or mine in #16) and push a new release?

electron-bot commented 3 years ago

:tada: This PR is included in version 1.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: