Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-05-05 06:18:51 +0400
committerisaacs <i@izs.me>2011-05-05 06:18:51 +0400
commit02ec1857cf33e67f83652b44c8434956222ab8b9 (patch)
tree2db2f6361407a5c900215ed6fb97033ae847413b
parent0ff0268b7dbb90048df4b447a911850ceefc75b0 (diff)
implicitly install globally properly
-rw-r--r--lib/link.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/link.js b/lib/link.js
index c4afa3a95..2e390561d 100644
--- a/lib/link.js
+++ b/lib/link.js
@@ -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()) {