diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-05-28 21:04:08 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-05-29 18:06:04 +0200 |
commit | c58cea5a163cd5d7133e00fdf257325ce3807c09 (patch) | |
tree | 1b7f97c0474f1990450a54e82b4432ec37de1956 /deps/npm/node_modules/cacache/lib/entry-index.js | |
parent | 88fe7e84e56e44a727169c07ee040cbf67f9c0a8 (diff) | |
download | android-node-v8-c58cea5a163cd5d7133e00fdf257325ce3807c09.tar.gz android-node-v8-c58cea5a163cd5d7133e00fdf257325ce3807c09.tar.bz2 android-node-v8-c58cea5a163cd5d7133e00fdf257325ce3807c09.zip |
deps: upgrade npm to 5.0.0
PR-URL: https://github.com/nodejs/node/pull/13276
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/cacache/lib/entry-index.js')
-rw-r--r-- | deps/npm/node_modules/cacache/lib/entry-index.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js index d95d0452a2..face0fe79c 100644 --- a/deps/npm/node_modules/cacache/lib/entry-index.js +++ b/deps/npm/node_modules/cacache/lib/entry-index.js @@ -10,6 +10,7 @@ const hashToSegments = require('./util/hash-to-segments') const ms = require('mississippi') const path = require('path') const ssri = require('ssri') +const Y = require('./util/y.js') const indexV = require('../package.json')['cache-version'].index @@ -21,7 +22,7 @@ const from = ms.from module.exports.NotFoundError = class NotFoundError extends Error { constructor (cache, key) { - super('content not found') + super(Y`No cache entry for \`${key}\` found in \`${cache}\``) this.code = 'ENOENT' this.cache = cache this.key = key @@ -214,7 +215,9 @@ function formatEntry (cache, entry) { } function readdirOrEmpty (dir) { - return readdirAsync(dir).catch({code: 'ENOENT'}, () => []) + return readdirAsync(dir) + .catch({code: 'ENOENT'}, () => []) + .catch({code: 'ENOTDIR'}, () => []) } function nop () { |