Dedupe request in apm folder

This prevents long path issues on Windows
This commit is contained in:
Kevin Sawicki
2014-07-10 11:47:02 -07:00
parent 3921a63f67
commit 3402c8dcd1

View File

@@ -44,23 +44,39 @@ function bootstrap() {
var apmInstallCommand = npmPath + npmFlags + 'install';
var apmInstallOptions = {cwd: apmInstallPath};
var moduleInstallCommand = apmPath + ' install' + apmFlags;
var dedupeCommand = apmPath + ' dedupe' + apmFlags;
var dedupeApmCommand = apmPath + ' dedupe' + apmFlags;
var dedupeNpmCommand = npmPath + npmFlags + 'dedupe';
if (process.argv.indexOf('--no-quiet') === -1) {
buildInstallCommand += ' --quiet';
apmInstallCommand += ' --quiet';
moduleInstallCommand += ' --quiet';
dedupeCommand += ' --quiet';
dedupeApmCommand += ' --quiet';
dedupeNpmCommand += ' --quiet';
buildInstallOptions.ignoreStdout = true;
apmInstallOptions.ignoreStdout = true;
}
var commands = [
{command: buildInstallCommand, message: 'Installing build modules...', options: buildInstallOptions},
{command: apmInstallCommand, message: 'Installing apm...', options: apmInstallOptions},
{
command: buildInstallCommand,
message: 'Installing build modules...',
options: buildInstallOptions
},
{
command: apmInstallCommand,
message: 'Installing apm...',
options: apmInstallOptions
},
apmPath + ' clean' + apmFlags,
moduleInstallCommand,
dedupeCommand + ' ' + packagesToDedupe.join(' '),
dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
{
command: dedupeNpmCommand + ' request',
options: {
cwd: path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager')
}
},
];
process.chdir(path.dirname(__dirname));