Skip to content

Commit

Permalink
Fixes oracle#1675 - capture stdout for CL errors
Browse files Browse the repository at this point in the history
  • Loading branch information
osmanrafiqss committed Sep 19, 2019
1 parent d6ce8ad commit 2ec4bb9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Path compileAndParseError(List<String> options, Path source, Path target)
InputStream is = compilingProcess.getInputStream();

List<String> lines = FileUtils.readAllLines(es);
FileUtils.readAllLines(is);
List<String> outputLines = FileUtils.readAllLines(is);
int status = compilingProcess.waitFor();

boolean errorReported = false;
Expand All @@ -76,7 +76,11 @@ public Path compileAndParseError(List<String> options, Path source, Path target)
}
}
if (status != 0 && !errorReported) {
reportCompilerError(source, lines.toString());
if (Platform.includedIn(Platform.WINDOWS.class)) {
reportCompilerError(source, outputLines.toString());
} else {
reportCompilerError(source, lines.toString());
}
}
compilingProcess.destroy();
return target;
Expand Down

0 comments on commit 2ec4bb9

Please sign in to comment.