Skip to content

Commit

Permalink
Upgrade apm to include bundled node
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsawicki committed Mar 3, 2014
1 parent 65acfe6 commit d8e314b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if (!fs.existsSync(apmInstallPath))
if (!fs.existsSync(path.join(apmInstallPath, 'node_modules')))
fs.mkdirSync(path.join(apmInstallPath, 'node_modules'));

var apmPath = 'apm/node_modules/atom-package-manager/bin/apm'
var apmFlags = process.env.JANKY_SHA1 || process.argv.indexOf('--no-color') !== -1 ? '--no-color' : '';
var packagesToDedupe = ['fs-plus', 'humanize-plus', 'oniguruma', 'roaster', 'season'];
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
Expand All @@ -35,11 +36,11 @@ var commands = [
{command: 'npm --strict-ssl=false install --quiet', options: {cwd: apmVendorPath, ignoreStdout: true}},
{command: 'npm --strict-ssl=false install --quiet ' + apmVendorPath, options: {cwd: apmInstallPath, ignoreStdout: true}},
{command: 'npm --strict-ssl=false install --quiet ' + apmVendorPath, options: {ignoreStdout: true}},
{command: 'node ../../apm/node_modules/atom-package-manager/bin/apm rebuild', options: {cwd: path.resolve('node_modules', 'atom-package-manager'), ignoreStdout: true}},
{command: '../../' + apmPath + ' rebuild', options: {cwd: path.resolve('node_modules', 'atom-package-manager'), ignoreStdout: true}},
echoNewLine,
'node apm/node_modules/atom-package-manager/bin/apm clean ' + apmFlags,
'node apm/node_modules/atom-package-manager/bin/apm install --quiet ' + apmFlags,
'node apm/node_modules/atom-package-manager/bin/apm dedupe --quiet ' + apmFlags + ' ' + packagesToDedupe.join(' '),
apmPath + ' clean ' + apmFlags,
apmPath + ' install --quiet ' + apmFlags,
apmPath + ' dedupe --quiet ' + apmFlags + ' ' + packagesToDedupe.join(' '),
];

process.chdir(path.dirname(__dirname));
Expand Down
2 changes: 1 addition & 1 deletion src/package-manager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PackageManager

# Public: Get the path to the apm command
getApmPath: ->
@apmPath ?= require.resolve('atom-package-manager/bin/apm')
@apmPath ?= require.resolve('atom-package-manager/lib/cli')

# Public: Get the paths being used to look for packages.
#
Expand Down
2 changes: 1 addition & 1 deletion vendor/apm

0 comments on commit d8e314b

Please sign in to comment.