From b26c0b6bd3c6d1d87bc13b65e3022854bffb5c21 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Thu, 12 Mar 2020 14:23:35 -0700 Subject: [PATCH] fix npm run dist:dir --- scripts/electron-builder-wrapper.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/electron-builder-wrapper.js b/scripts/electron-builder-wrapper.js index f5aa406..a6fb573 100644 --- a/scripts/electron-builder-wrapper.js +++ b/scripts/electron-builder-wrapper.js @@ -50,9 +50,10 @@ const runBuilder = function (targetGroup) { throw new Error(`NSIS build requires CSC_LINK or WIN_CSC_LINK`); } const platformFlag = getPlatformFlag(); - const command = `electron-builder ${platformFlag} ${targetGroup}`; - console.log(`running: ${command}`); - const result = spawnSync(command, { + const customArgs = process.argv.slice(2); // remove `node` and `this-script.js` + const allArgs = [platformFlag, targetGroup, ...customArgs]; + console.log(`running electron-builder with arguments: ${allArgs}`); + const result = spawnSync('electron-builder', allArgs, { env: childEnvironment, shell: true, stdio: 'inherit'