Skip to content

Commit 0fb8037

Browse files
committedMar 1, 2018
feat(logging): let users know when file: resolved packages fail integrity check
1 parent 45080bb commit 0fb8037

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎lib/with-tarball-stream.js

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ function withTarballStream (spec, opts, streamHandler) {
4242
.pipe(verifier)
4343
return streamHandler(stream)
4444
})
45+
.catch(err => {
46+
if (err.code === 'EINTEGRITY') {
47+
opts.log.warn('pacote', `EINTEGRITY while extracting ${spec} from ${file}.You will have to recreate the file.`)
48+
opts.log.verbose('pacote', `EINTEGRITY for ${spec}: ${err.message}`)
49+
}
50+
throw err
51+
})
4552
})
4653
: BB.reject(Object.assign(new Error('no file!'), {code: 'ENOENT'}))
4754

0 commit comments

Comments
 (0)
Please sign in to comment.