diff options
author | isaacs <i@izs.me> | 2010-05-13 23:46:17 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-05-13 23:46:17 +0400 |
commit | ddba942d749d0f710fa1be76d1b17d69203e8518 (patch) | |
tree | 60f6b907738c64d06d3cfcc10ec560ef0b801a1c /lib | |
parent | 3cd56bd47bee6599263152a93d2adf1f31f379c7 (diff) |
Share the data when installing a remote tarball.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cache.js | 7 |
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) + }) }) }) } |