Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue48_bugfix #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function fatalError(stderr) {
message: [{
path: '',
code: 0,
end: 0,
context: '',
line: 0,
start: 0,
descr: stderr
Expand Down Expand Up @@ -81,6 +83,10 @@ function executeFlow(_path, options) {
dat += data.toString();
});

stream.stderr.on('data', function (error) {
dat = error.toString('utf8');
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.


stream.stdout.on('end', () =>{
var parsed;
try {
Expand All @@ -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) {
Expand Down