mirror of
https://github.com/atom/atom.git
synced 2026-01-12 16:38:20 -05:00
18 lines
513 B
JavaScript
18 lines
513 B
JavaScript
'use strict';
|
|
|
|
const childProcess = require('child_process');
|
|
|
|
const CONFIG = require('../config');
|
|
|
|
module.exports = function(packagePath, ci, stdioOptions) {
|
|
const installEnv = Object.assign({}, process.env);
|
|
// Set resource path so that apm can load metadata related to Atom.
|
|
installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath;
|
|
|
|
childProcess.execFileSync(CONFIG.getApmBinPath(), [ci ? 'ci' : 'install'], {
|
|
env: installEnv,
|
|
cwd: packagePath,
|
|
stdio: stdioOptions || 'inherit'
|
|
});
|
|
};
|