'use strict';

const childProcess = require('child_process');

const CONFIG = require('../config');

// Recognised by '@electron/get', used by the 'electron-mksnapshot' and 'electron-chromedriver' dependencies
process.env.ELECTRON_CUSTOM_VERSION = CONFIG.appMetadata.electronVersion;

module.exports = function(ci) {
  console.log('Installing script dependencies');
  childProcess.execFileSync(
    'npm',
    ['--loglevel=error', ci ? 'ci' : 'install'],
    { env: process.env, cwd: CONFIG.scriptRootPath }
  );
};

@@ -359,16 +359,87 @@
 cies');%0A
+  const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm';%0A
   childP
@@ -463,21 +463,26 @@
 nc(%0A    
-'
 npm
-'
+BinName
 ,%0A    %5B'

Use correct npm bin name depending on the OS