pulsar/script/lib/install-script-dependencies.js
DeeDeeG 9e8b0b14fa script: Use "ELECTRON_CUSTOM_VERSION" env variable
New feature as of electron-chromedriver >= 9.0.0
and electron-mksnapshot >= 9.0.2:
an environment variable "ELECTRON_CUSTOM_VERSION",
which allows downloading the specified (Electron-vendored)
version of chromedriver and mksnapshot,
irrespective of the versions of electron-chromedriver
or electron-mksnapshot (node modules) used to download them.

We can use the latest electron-chromedriver and electron-mksnapshot
now, if we want. Just set ELECTRON_CUSTOM_VERSION to the right version
(handled automatically based on "electronVersion" in package.json).
2020-06-03 13:45:49 -04:00

17 lines
426 B
JavaScript

'use strict';
const childProcess = require('child_process');
const CONFIG = require('../config');
process.env.ELECTRON_CUSTOM_VERSION = CONFIG.appMetadata.electronVersion;
module.exports = function(ci) {
console.log('Installing script dependencies');
childProcess.execFileSync(
CONFIG.getNpmBinPath(ci),
['--loglevel=error', ci ? 'ci' : 'install'],
{ env: process.env, cwd: CONFIG.scriptRootPath }
);
};