Skip to content

Commit

Permalink
maybe we need to run this *after* the previous step
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Dec 19, 2023
1 parent d0ed2f0 commit 8aa94d1
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,26 @@ let config = {
},
packageAfterPrune: async (forgeConfig, buildPath, electronVersion, platform, arch) => {
// Workaround from https://www.update.rocks/blog/fixing-the-python3/

const npmInstall = spawnSync("npm", ["install", "--omit=dev"], {
cwd: buildPath,
stdio: "inherit",
shell: true,
});

console.log(buildPath);

// Clear out prebuilds for other architectures
// 1) we don't need them
// 2) windows binary signing tool blows up when it tries to sign them.

const prebuilds = glob.GlobSync(`${buildPath}/**/prebuilds/*`);
const matchString = new RegExp(`prebuilds/${platform}`);
prebuilds.found.forEach(function(path) {
if (! path.match(matchString)) {
fs.rmdirSync(path, { recursive: true });
}
});
if (platform === 'darwin') {
console.log("We need to remove the problematic link file on macOS");
console.log(`Build path ${buildPath}`);
Expand Down Expand Up @@ -178,26 +198,6 @@ if (platform === 'darwin') {

}
}

const npmInstall = spawnSync("npm", ["install", "--omit=dev"], {
cwd: buildPath,
stdio: "inherit",
shell: true,
});

console.log(buildPath);

// Clear out prebuilds for other architectures
// 1) we don't need them
// 2) windows binary signing tool blows up when it tries to sign them.

const prebuilds = glob.GlobSync(`${buildPath}/**/prebuilds/*`);
const matchString = new RegExp(`prebuilds/${platform}`);
prebuilds.found.forEach(function(path) {
if (! path.match(matchString)) {
fs.rmdirSync(path, { recursive: true });
}
});
},
}
};
Expand Down

0 comments on commit 8aa94d1

Please sign in to comment.