Skip to content

Commit c9cf513

Browse files
committed
bootstrap: Always use npm install (not npm ci)
This change only affects the CI environment. Allows better re-use of existing installed packages (such as those restored from a cache). `npm ci` and `apm ci` forced a fresh reinstall of packages, including rebuilding all native code. Rebuilding native code accounts for the majority of install time. By not rebuilding native code unless totally necessary, `npm install` and `apm install` can save a lot of time versus `npm ci` and `apm ci`.
1 parent 8fac662 commit c9cf513

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

script/lib/install-script-dependencies.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ process.env.ELECTRON_CUSTOM_VERSION = CONFIG.appMetadata.electronVersion;
99
module.exports = function(ci) {
1010
console.log('Installing script dependencies');
1111
childProcess.execFileSync(
12-
CONFIG.getNpmBinPath(ci),
13-
['--loglevel=error', ci ? 'ci' : 'install'],
12+
CONFIG.getNpmBinPath(),
13+
['--loglevel=error', 'install'],
1414
{ env: process.env, cwd: CONFIG.scriptRootPath }
1515
);
1616
};

script/lib/run-apm-install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = function(packagePath, ci, stdioOptions) {
1111
// Set our target (Electron) version so that node-pre-gyp can download the
1212
// proper binaries.
1313
installEnv.npm_config_target = CONFIG.appMetadata.electronVersion;
14-
childProcess.execFileSync(CONFIG.getApmBinPath(), [ci ? 'ci' : 'install'], {
14+
childProcess.execFileSync(CONFIG.getApmBinPath(), ['install'], {
1515
env: installEnv,
1616
cwd: packagePath,
1717
stdio: stdioOptions || 'inherit'

0 commit comments

Comments
 (0)