summaryrefslogtreecommitdiff
path: root/deps/npm/lib/cache.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/cache.js')
-rw-r--r--deps/npm/lib/cache.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index b606ef2517..c182817e4f 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -287,6 +287,10 @@ function fetchAndShaCheck (u, tmp, shasum, cb) {
if (!shasum) return cb(null, response)
// validate that the url we just downloaded matches the expected shasum.
sha.check(tmp, shasum, function (er) {
+ if (er != null && er.message) {
+ // add original filename for better debuggability
+ er.message = er.message + '\n' + 'From: ' + u
+ }
return cb(er, response, shasum)
})
})