mirror of https://github.com/atom/atom.git
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
This commit is contained in:
parent
6596e0fb4a
commit
790511ac51
|
@ -72,9 +72,9 @@
|
|||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
|
||||
"integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
|
||||
"requires": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^2.0.6"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const spawnSync = require('./lib/spawn-sync');
|
||||
|
||||
|
@ -111,14 +112,6 @@ function getApmBinPath() {
|
|||
);
|
||||
}
|
||||
|
||||
function getNpmBinPath(external = false) {
|
||||
const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
const localNpmBinPath = path.resolve(
|
||||
repositoryRootPath,
|
||||
'script',
|
||||
'node_modules',
|
||||
'.bin',
|
||||
npmBinName
|
||||
);
|
||||
return localNpmBinPath;
|
||||
function getNpmBinPath() {
|
||||
return process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
}
|
||||
|
|
|
@ -9,9 +9,8 @@ process.env.ELECTRON_CUSTOM_VERSION = CONFIG.appMetadata.electronVersion;
|
|||
|
||||
module.exports = function(ci) {
|
||||
console.log('Installing script dependencies');
|
||||
const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
childProcess.execFileSync(
|
||||
npmBinName,
|
||||
CONFIG.getNpmBinPath(ci),
|
||||
['--loglevel=error', ci ? 'ci' : 'install'],
|
||||
{ env: process.env, cwd: CONFIG.scriptRootPath }
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue