Skip to content

Commit

Permalink
Use local outputstream reference (#42180)
Browse files Browse the repository at this point in the history
This commit fixes the logging in LoggedExec which uses an in memory
buffer to read from a local reference, instead of with
getStandardOutput() of the Exec task. This is due to gradle internally
wrapping with a TeeOutputStream, breaking our cast.
  • Loading branch information
rjernst authored May 16, 2019
1 parent f3dbfdb commit 41739a1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void setSpoolOutput(boolean spoolOutput) {
};
} else {
out = new ByteArrayOutputStream();
outputLogger = logger -> logger.error(((ByteArrayOutputStream) getStandardOutput()).toString(StandardCharsets.UTF_8));
outputLogger = logger -> logger.error(((ByteArrayOutputStream) out).toString(StandardCharsets.UTF_8));
}
setStandardOutput(out);
setErrorOutput(out);
Expand Down

0 comments on commit 41739a1

Please sign in to comment.