Use local outputstream reference (#42180)
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.
This commit is contained in:
parent
51376f98a7
commit
c40bd31073
|
@ -70,7 +70,7 @@ public class LoggedExec extends Exec {
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
out = new ByteArrayOutputStream();
|
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);
|
setStandardOutput(out);
|
||||||
setErrorOutput(out);
|
setErrorOutput(out);
|
||||||
|
|
Loading…
Reference in New Issue