Skip to content

Commit 0b1bcbe

Browse files
committed
fix(checkStream): make sure to pass all opts through
opts.algorithms was not getting passed in, which caused issues
1 parent 75be125 commit 0b1bcbe

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: index.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,9 @@ module.exports.checkStream = checkStream
214214
function checkStream (stream, sri, opts) {
215215
opts = opts || {}
216216
const P = opts.Promise || Promise
217-
const checker = integrityStream({
218-
integrity: sri,
219-
size: opts.size,
220-
strict: opts.strict,
221-
pickAlgorithm: opts.pickAlgorithm
222-
})
217+
const checker = integrityStream(Object.assign({}, opts, {
218+
integrity: sri
219+
}))
223220
return new P((resolve, reject) => {
224221
stream.pipe(checker)
225222
stream.on('error', reject)

0 commit comments

Comments
 (0)