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
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-05-13 23:46:17 +0400
committerisaacs <i@izs.me>2010-05-13 23:46:17 +0400
commitddba942d749d0f710fa1be76d1b17d69203e8518 (patch)
tree60f6b907738c64d06d3cfcc10ec560ef0b801a1c /lib
parent3cd56bd47bee6599263152a93d2adf1f31f379c7 (diff)
Share the data when installing a remote tarball.
Diffstat (limited to 'lib')
-rw-r--r--lib/cache.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cache.js b/lib/cache.js
index 59adb44fb..7532acee9 100644
--- a/lib/cache.js
+++ b/lib/cache.js
@@ -144,9 +144,12 @@ function addLocalTarball (p, cb) {
if (p.indexOf(npm.cache) !== 0) {
return unpackTar(p, tmp, function (er) {
if (er) return log.er(cb, "Failed to unpack "+p)(er)
- addLocalDirectory(tmp, function (er) {
+ addLocalDirectory(tmp, function (er, data) {
if (er) cb(er)
- rm(tmp, log.er(cb, "Could not remove "+tmp))
+ rm(tmp, function (er) {
+ if (er) return log.er(cb, "Could not remove "+tmp)
+ cb(er, data)
+ })
})
})
}