Skip to content

Commit bdd6628

Browse files
committedMar 1, 2018
fix(tarball): catch errors thrown from stream handler
1 parent c9d17a9 commit bdd6628

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎lib/with-tarball-stream.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@ function withTarballStream (spec, opts, streamHandler) {
102102
opts.integrity = i
103103
})
104104
}
105-
tardata.once('error', err => tardata.on('newListener', (ev, l) => {
106-
if (ev === 'error') { l(err) }
107-
}))
108-
return streamHandler(tardata)
105+
tardata.on('error', err => console.error('ERROR:', err))
106+
return BB.try(() => streamHandler(tardata))
109107
.catch(err => {
110108
// Retry once if we have a cache, to clear up any weird conditions.
111109
// Don't retry network errors, though -- make-fetch-happen has already

0 commit comments

Comments
 (0)
Please sign in to comment.