Permalink
Browse files

implicitly install globally properly

  • Loading branch information...
1 parent 0ff0268 commit 02ec1857cf33e67f83652b44c8434956222ab8b9 @isaacs isaacs committed May 5, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/link.js
View
@@ -42,7 +42,9 @@ function linkInstall (pkgs, cb) {
asyncMap(pkgs, function (pkg, cb) {
function n (er, data) {
if (er) return cb(er, data)
- pp = data[0][0]
+ // install returns [ [pkgId, folder], ... ]
+ // but we definitely installed just one thing.
+ pp = data[0][1]
pkg = path.basename(pp)
target = path.resolve(npm.dir, pkg)
next()
@@ -68,7 +70,6 @@ function linkInstall (pkgs, cb) {
fs.lstat(pp, function (er, st) {
if (er) {
- log.error(pkg, "not installed globally")
rp = pp
return npm.commands.install(t, pkg, n)
} else if (!st.isSymbolicLink()) {

0 comments on commit 02ec185

Please sign in to comment.