Once more, with feeling.

This commit is contained in:
joshaber
2015-12-28 15:42:19 -05:00
parent be9d74adbf
commit 1eceae96cc
2 changed files with 24 additions and 6 deletions

View File

@@ -71,6 +71,17 @@ function bootstrap() {
var moduleInstallCommand = apmPath + ' install' + apmFlags;
var dedupeApmCommand = apmPath + ' dedupe' + apmFlags;
var moduleInstallEnv = {};
for (var e in process.env) {
moduleInstallEnv[e] = process.env[e];
}
var electronVersion = require('../package.json').electronVersion;
moduleInstallEnv.npm_config_target = electronVersion;
moduleInstallEnv.npm_config_runtime = 'electron';
moduleInstallEnv.npm_config_disturl = 'https://atom.io/download/atom-shell';
var moduleInstallOptions = {env: moduleInstallEnv};
if (process.argv.indexOf('--no-quiet') === -1) {
buildInstallCommand += ' --loglevel error';
apmInstallCommand += ' --loglevel error';
@@ -96,9 +107,19 @@ function bootstrap() {
message: 'Installing apm...',
options: apmInstallOptions
},
apmPath + ' clean' + apmFlags,
moduleInstallCommand,
dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
{
command: apmPath + ' clean' + apmFlags,
message: 'Deleting old modules...',
options: moduleInstallOptions
},
{
command: moduleInstallCommand,
options: moduleInstallOptions
},
{
command: dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
options: moduleInstallOptions
}
];
process.chdir(path.dirname(__dirname));