Skip to content

Commit 035531a

Browse files
committed
bootstrap: Use the --no-save flag in CI
Prevents the cache from becoming outdated when e.g. The "version" field of `package.json` is updated and checked in, but not updated or checked in for `package-lock.json`.
1 parent a2c211d commit 035531a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

script/lib/install-apm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function(ci) {
99
// npm ci leaves apm with a bunch of unmet dependencies
1010
childProcess.execFileSync(
1111
CONFIG.getNpmBinPath(),
12-
['--global-style', '--loglevel=error', 'install'],
12+
['--global-style', '--loglevel=error', 'install', ci ? '--no-save' : ''],
1313
{ env: process.env, cwd: CONFIG.apmRootPath }
1414
);
1515
};

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(), ['install'], {
14+
childProcess.execFileSync(CONFIG.getApmBinPath(), ['install', ci ? '--no-save' : ''], {
1515
env: installEnv,
1616
cwd: packagePath,
1717
stdio: stdioOptions || 'inherit'

0 commit comments

Comments
 (0)