diff options
Diffstat (limited to 'deps/npm/node_modules/cacache/lib/content/read.js')
-rw-r--r-- | deps/npm/node_modules/cacache/lib/content/read.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js index 0ba19ac6e9..14ca7d905d 100644 --- a/deps/npm/node_modules/cacache/lib/content/read.js +++ b/deps/npm/node_modules/cacache/lib/content/read.js @@ -7,6 +7,7 @@ const fs = require('graceful-fs') const PassThrough = require('stream').PassThrough const pipe = BB.promisify(require('mississippi').pipe) const ssri = require('ssri') +const Y = require('../util/y.js') BB.promisifyAll(fs) @@ -86,7 +87,7 @@ function pickContentSri (cache, integrity) { } function sizeError (expected, found) { - var err = new Error('stream data size mismatch') + var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) err.expected = expected err.found = found err.code = 'EBADSIZE' @@ -94,7 +95,7 @@ function sizeError (expected, found) { } function integrityError (sri, path) { - var err = new Error(`Integrity verification failed for ${sri} (${path})`) + var err = new Error(Y`Integrity verification failed for ${sri} (${path})`) err.code = 'EINTEGRITY' err.sri = sri err.path = path |