Merge pull request #2432 from atom/ks-install-npm-in-build-folder-on-ci

Install npm in build folder on CI
This commit is contained in:
Kevin Sawicki
2014-05-28 18:50:58 -07:00
2 changed files with 3 additions and 2 deletions

View File

@@ -45,13 +45,14 @@ var apmPath = path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package
var apmFlags = process.env.JANKY_SHA1 || process.argv.indexOf('--no-color') !== -1 ? '--no-color' : '';
var npmPath = path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'npm');
var initialNpmCommand = fs.existsSync(npmPath) ? npmPath : 'npm';
var npmFlags = ' --userconfig=' + path.resolve('.npmrc') + ' ';
var packagesToDedupe = ['fs-plus', 'humanize-plus', 'oniguruma', 'roaster', 'season'];
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
var commands = [
{command: 'npm' + npmFlags + 'install --quiet', options: {cwd: path.resolve(__dirname, '..', 'build'), ignoreStdout: true}},
{command: initialNpmCommand + npmFlags + 'install --quiet', options: {cwd: path.resolve(__dirname, '..', 'build'), ignoreStdout: true}},
{command: npmPath + npmFlags + 'install --quiet', options: {cwd: apmInstallPath, ignoreStdout: true}},
echoNewLine,
apmPath + ' clean ' + apmFlags,

View File

@@ -28,7 +28,7 @@ function readEnvironmentVariables() {
}
readEnvironmentVariables();
cp.safeExec.bind(global, 'npm install npm', function() {
cp.safeExec.bind(global, 'npm install npm', {cwd: path.resolve(__dirname, '..', 'build')}, function() {
cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
if (error)
process.exit(1);