Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 9485853

Browse files
committed
fix: error handling for refs/refs local
1 parent 84117a1 commit 9485853

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/files-regular/refs-local-readable-stream.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ module.exports = (send) => {
1313
send({ path: 'refs/local', qs: opts }, (err, stream) => {
1414
if (err) { return pt.destroy(err) }
1515

16+
stream.once('error', (err) => pt.destroy(err))
17+
1618
pump(stream, through.obj(function (r, enc, cb) {
1719
cb(null, { ref: r.Ref, err: r.Err })
1820
}), pt)

src/files-regular/refs-readable-stream.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module.exports = (send) => {
2020
send({ path: 'refs', args, qs: opts }, (err, stream) => {
2121
if (err) { return pt.destroy(err) }
2222

23+
stream.once('error', (err) => pt.destroy(err))
24+
2325
pump(stream, through.obj(function (r, enc, cb) {
2426
cb(null, { ref: r.Ref, err: r.Err })
2527
}), pt)

0 commit comments

Comments
 (0)