[Pkg-javascript-commits] [node-module-deps] 233/444: re-emit transform stream errors

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:59 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 3ea62253f9e56a3f1dfe5eaf272cb4b4c0c878ba
Author: James Halliday <mail at substack.net>
Date:   Wed May 14 23:23:02 2014 +0200

    re-emit transform stream errors
---
 index.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 26af4e8..5f59113 100644
--- a/index.js
+++ b/index.js
@@ -184,7 +184,7 @@ Deps.prototype.getTransforms = function (file, pkg) {
     
     for (var i = 0; i < transforms.length; i++) (function (i) {
         makeTransform(transforms[i], function (err, trs) {
-            if (err) return dup.emit('error', err)
+            if (err) return self.emit('error', err)
             streams[i] = trs;
             if (-- pending === 0) done();
         });
@@ -193,6 +193,9 @@ Deps.prototype.getTransforms = function (file, pkg) {
     
     function done () {
         var middle = combine.apply(null, streams);
+        middle.on('error', function (err) {
+            self.emit('error', err);
+        });
         input.pipe(middle).pipe(output);
     }
     

-- 
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