[Pkg-javascript-commits] [node-module-deps] 244/444: Preserve transform stream errors when wrapped

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-module-deps.

commit 6336e04881b09efca697e729fe642ce28cba411f
Author: Glen Mailer <glenjamin at gmail.com>
Date:   Fri Jul 4 13:39:49 2014 +0100

    Preserve transform stream errors when wrapped
---
 index.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 98957dc..360f3ab 100644
--- a/index.js
+++ b/index.js
@@ -443,5 +443,7 @@ function wrapTransform (tr) {
     if (typeof tr.read === 'function') return tr;
     var input = through(), output = through();
     input.pipe(tr).pipe(output);
-    return duplexer(input, output);
+    var wrapper = duplexer(input, output);
+    tr.on('error', wrapper.emit.bind(wrapper, 'error');
+    return wrapper;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git



More information about the Pkg-javascript-commits mailing list