Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
Fix dependency regression
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed Aug 9, 2011
1 parent 0e84e0d commit 85c7794
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions lib/ender.file.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,14 @@ ENDER.file = module.exports = {
var tree = {}
, x = 0
, that = this
, packagePath
, isInstallingFromRoot

packages.forEach(function (packageName) {
packageName = packageName.replace(/\@.*/, '')
packagePath = /^[\/.]/.test(packageName) ? path.join(packageName, 'package.json') : path.join(dir, packageName, 'package.json')
isInstallingFromRoot = /^\.\/?$/.test(packageName)
var packageName = packageName.replace(/\@.*/, '')
, packagePath = /^[\/.]/.test(packageName) ? path.join(packageName, 'package.json') : path.join(dir, packageName, 'package.json')
, isInstallingFromRoot = /^\.\/?$/.test(packageName)

async.waterfall([
async.apply(fs.readFile, packagePath, 'utf-8')
function (cb) { fs.readFile(packagePath, 'utf-8', function (err, data) { if (err) { return ++x }cb(err, data) }) }
, function (data, cb) { ENDER.file.findDependencies(data, tree, dir, isInstallingFromRoot, cb) }
, function () { if (++x == packages.length) { callback(null, tree) } }
])
Expand Down
2 changes: 1 addition & 1 deletion lib/ender.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var colors = require('colors')
return console.log('Specified packages already installed.')
}

uniqueActivePackageNames = uniqueActivePackageNames.concat(newPackages)
uniqueActivePackageNames = ENDER.util.unique(uniqueActivePackageNames.concat(newPackages))
context = ENDER.cmd.getContext(type, uniqueActivePackageNames, options.context)

async.waterfall([
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ender",
"description": "next level JavaScript modules",
"version": "0.6.4",
"version": "0.6.5",
"authors": ["Dustin Diaz <@ded>", "Jacob Thornton <@fat>"],
"keywords": ["ender", "modules", "builder", "framework", "packager"],
"main": "./lib/ender.js",
Expand Down

0 comments on commit 85c7794

Please sign in to comment.