Files
atom/script/lib/install-script-dependencies.js
icecream17 790511ac51 Fix npm ENOENT error in install-script-runner-dependencies
Despite what https://github.com/atom/atom/pull/23322 is named,
the pull request actually makes install-script-dependencies
use the non-local npm binary.

So this pr fixes install-script-runner-dependencies by making the npmBinPath
consistent with install-script-dependencies

ENOENT detected by https://github.com/atom-community/atom/pull/351,
specifically https://dev.azure.com/atomcommunity/atomcommunity/_build/results?buildId=1132&view=logs&j=2985f0af-e798-5fdc-91b8-be9f0a3685c5&t=0a53f124-4db9-5fc3-be81-e293757effc7&l=16
2022-02-26 16:26:23 -06:00

18 lines
535 B
JavaScript

'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(
CONFIG.getNpmBinPath(ci),
['--loglevel=error', ci ? 'ci' : 'install'],
{ env: process.env, cwd: CONFIG.scriptRootPath }
);
};