mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
23 lines
613 B
JavaScript
23 lines
613 B
JavaScript
'use strict';
|
|
|
|
const childProcess = require('child_process');
|
|
|
|
const CONFIG = require('../config');
|
|
|
|
function installApm(ci) {
|
|
console.log('Installing apm');
|
|
// npm ci leaves apm with a bunch of unmet dependencies
|
|
childProcess.execFileSync(
|
|
CONFIG.getNpmBinPath(),
|
|
['--global-style', '--loglevel=error', 'install'],
|
|
{ env: process.env, cwd: CONFIG.apmRootPath }
|
|
);
|
|
childProcess.execFileSync(CONFIG.getApmBinPath(), ['--version'], {
|
|
stdio: 'inherit'
|
|
});
|
|
}
|
|
|
|
const { expose } = require(`${CONFIG.scriptRunnerModulesPath}/threads/worker`);
|
|
expose(installApm);
|
|
module.exports = installApm;
|