Skip to content

Commit

Permalink
[react-native] Make flow warn on timeout instead of redbox
Browse files Browse the repository at this point in the history
  • Loading branch information
jingc committed Aug 25, 2015
1 parent 75df3b5 commit a57353b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packager/getFlowTypeCheckMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ function doFlowTypecheck(res, flowroot, next) {
hasWarned.noConfig = true;
console.warn(chalk.yellow('flow: ' + stderr));
}
_endFlowBad(res);
} else if (flowError.code === 3) {
if (!hasWarned.timeout) {
hasWarned.timeout = true;
console.warn(chalk.yellow('flow: ' + stdout));
}
_endSkipFlow(res);
} else {
if (!hasWarned.brokenFlow) {
hasWarned.brokenFlow = true;
Expand All @@ -107,8 +114,8 @@ function doFlowTypecheck(res, flowroot, next) {
'`.\n' + 'stderr: `' + stderr + '`'
));
}
_endFlowBad(res);
}
_endFlowBad(res);
return;
}
}
Expand Down

0 comments on commit a57353b

Please sign in to comment.