Skip to content

Commit b26c0b6

Browse files
author
Christopher Willis-Ford
committed
fix npm run dist:dir
1 parent af73790 commit b26c0b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/electron-builder-wrapper.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ const runBuilder = function (targetGroup) {
5050
throw new Error(`NSIS build requires CSC_LINK or WIN_CSC_LINK`);
5151
}
5252
const platformFlag = getPlatformFlag();
53-
const command = `electron-builder ${platformFlag} ${targetGroup}`;
54-
console.log(`running: ${command}`);
55-
const result = spawnSync(command, {
53+
const customArgs = process.argv.slice(2); // remove `node` and `this-script.js`
54+
const allArgs = [platformFlag, targetGroup, ...customArgs];
55+
console.log(`running electron-builder with arguments: ${allArgs}`);
56+
const result = spawnSync('electron-builder', allArgs, {
5657
env: childEnvironment,
5758
shell: true,
5859
stdio: 'inherit'

0 commit comments

Comments
 (0)