Merge pull request #25709 from atom/fix-snapshot-result-macos

Fix `File` -> `Open…` menu on macOS
This commit is contained in:
Sergio Padrino 2022-11-22 17:11:57 +01:00 committed by GitHub
commit 1c3bd35ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -322,10 +322,20 @@ module.exports = function(packagedAppPath) {
const snapshotBinaries = ['v8_context_snapshot.bin', 'snapshot_blob.bin'];
for (let snapshotBinary of snapshotBinaries) {
const destinationPath = path.join(
let destinationPath = path.join(
startupBlobDestinationPath,
snapshotBinary
);
if (
process.platform === 'darwin' &&
snapshotBinary === 'v8_context_snapshot.bin'
) {
// TODO: check if we're building for arm64 and use the arm64 version of the binary
destinationPath = path.join(
startupBlobDestinationPath,
'v8_context_snapshot.x86_64.bin'
);
}
console.log(`Moving generated startup blob into "${destinationPath}"`);
try {
fs.unlinkSync(destinationPath);