diff --git a/apm/package-lock.json b/apm/package-lock.json index 7872f163b25..069dfba288d 100644 --- a/apm/package-lock.json +++ b/apm/package-lock.json @@ -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" diff --git a/script/bootstrap b/script/bootstrap index a25ce629ab1..7de39a8e5e6 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -2,7 +2,6 @@ 'use strict' -const path = require('path') const CONFIG = require('./config') const childProcess = require('child_process') const cleanDependencies = require('./lib/clean-dependencies') diff --git a/script/config.js b/script/config.js index 4fb052b4928..1dca02a1f46 100644 --- a/script/config.js +++ b/script/config.js @@ -54,6 +54,7 @@ module.exports = { homeDirPath, getApmBinPath, getNpmBinPath, + getLocalNpmBinPath, snapshotAuxiliaryData: {} }; @@ -111,7 +112,11 @@ function getApmBinPath() { ); } -function getNpmBinPath(external = false) { +function getNpmBinPath() { + return process.platform === 'win32' ? 'npm.cmd' : 'npm'; +} + +function getLocalNpmBinPath() { const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm'; const localNpmBinPath = path.resolve( repositoryRootPath, diff --git a/script/lib/install-apm.js b/script/lib/install-apm.js index a0c20162c8a..abd882eb376 100644 --- a/script/lib/install-apm.js +++ b/script/lib/install-apm.js @@ -12,7 +12,7 @@ module.exports = function(ci) { } console.log('Installing apm'); childProcess.execFileSync( - CONFIG.getNpmBinPath(), + CONFIG.getLocalNpmBinPath(), ['--global-style', '--loglevel=error', ci ? 'ci' : 'install'], { env: process.env, cwd: CONFIG.apmRootPath } ); diff --git a/script/lib/install-script-dependencies.js b/script/lib/install-script-dependencies.js index 11a01cd8675..bb026b35a35 100644 --- a/script/lib/install-script-dependencies.js +++ b/script/lib/install-script-dependencies.js @@ -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 } );