Description
Preflight Checklist
- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project follows, as appropriate.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
Issue Details
- Electron Packager Version:
Electron Packager 17.1.1
Node v16.17.1
Host Operating system: darwin 21.6.0 (x64) - Electron Version:
21.2.2 - Operating System:
macOS 12.6 arm64
Expected Behavior
macOS's Gatekeeper / spctl
doesn't like symlinks in app bundles with invalid destinations. Node-gyp creates such a sym link to the build machines python installation under node_modules, which gets bundled into your app if you're using a native module built with node-gyp.
This issue was already addressed with #1391, however this solution is not working. Despite ignoring it, node_gyp_bins
ends up in the output .app when using electron packager v17.1.1 (in my case, with electron forge v6.0.1). I also attempted to add the file / directory to the ignore
option, but the file persists.
So expected behavior is that node_gyp_bins
is excluded from the output
Actual Behavior
node_gyp_bins
directories with the troublemaker python3
symlink is included in the output app bundle, therefore a signed & notarized app fails to pass gatekeeper.
The only workaround I've found is to delete the directory manually in the afterPrune
hook.
To Reproduce
Minimal repro here: https://github.com/samdesota/electron-packager-symlink-issue
I used create-electron-app with default options to create this, and the issue persists. Used the dependency node-mac-permissions
to demonstrate the issue.