From 96a51e64a318bfd0cac5e0c504e7659ddd1d33ea Mon Sep 17 00:00:00 2001 From: Alex Alonso Date: Sat, 25 Nov 2017 15:26:14 -0200 Subject: [PATCH 1/2] issue48_bugfix --- index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index b28b053..693d4ff 100644 --- a/index.js +++ b/index.js @@ -29,6 +29,8 @@ function fatalError(stderr) { message: [{ path: '', code: 0, + end: 0, + context: '', line: 0, start: 0, descr: stderr @@ -81,6 +83,10 @@ function executeFlow(_path, options) { dat += data.toString(); }); + stream.stderr.on('data', function (error) { + dat = error.toString('utf8'); + }) + stream.stdout.on('end', () =>{ var parsed; try { @@ -93,10 +99,11 @@ function executeFlow(_path, options) { // loop through errors in file result.errors = parsed.errors.filter(function (error) { - let isCurrentFile = error.message[0].path === _path; - let generalError = (/(Fatal)/.test(error.message[0].descr)); + var isCurrentFile = error.message[0].path === _path; + var generalError = /(Fatal)/.test(error.message[0].descr); + var unsupportedError = /Unsupported/.test(error.message[0].descr); - return isCurrentFile || generalError; + return isCurrentFile || generalError || unsupportedError; }); if (result.errors.length) { From 7d0f2efb5b0873fffa74cbc4464979fa59092ad9 Mon Sep 17 00:00:00 2001 From: Alex Alonso Date: Sat, 25 Nov 2017 15:40:31 -0200 Subject: [PATCH 2/2] Added missing underline --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 693d4ff..aa60661 100644 --- a/index.js +++ b/index.js @@ -85,7 +85,7 @@ function executeFlow(_path, options) { stream.stderr.on('data', function (error) { dat = error.toString('utf8'); - }) + }); stream.stdout.on('end', () =>{ var parsed;