Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
7 changes: 6 additions & 1 deletion script/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module.exports = {
homeDirPath,
getApmBinPath,
getNpmBinPath,
getLocalNpmBinPath,
snapshotAuxiliaryData: {}
};

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion script/lib/install-apm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
);
Expand Down
3 changes: 1 addition & 2 deletions script/lib/install-script-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
);
Expand Down