Files
atom/script/lib/install-apm.js
2022-02-28 14:44:12 +00:00

20 lines
541 B
JavaScript

'use strict';
const childProcess = require('child_process');
const CONFIG = require('../config');
module.exports = function(ci) {
if (ci) {
// Tell apm not to dedupe its own dependencies during its
// postinstall script. (Deduping during `npm ci` runs is broken.)
process.env.NO_APM_DEDUPE = 'true';
}
console.log('Installing apm');
childProcess.execFileSync(
CONFIG.getLocalNpmBinPath(),
['--global-style', '--loglevel=error', ci ? 'ci' : 'install'],
{ env: process.env, cwd: CONFIG.apmRootPath }
);
};