Skip to content

Commit 3f78c08

Browse files
committed
Python parser must not truncate log file
Instead, the log entries should just be appended.
1 parent 25401d9 commit 3f78c08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rewrite-python/src/main/java/org/openrewrite/python/PythonParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ private void initializeRemoting(ExecutionContext ctx) throws IOException {
195195
(current != null ? current + File.pathSeparator : "") + pythonPath.stream().map(Path::toString).collect(Collectors.joining(File.pathSeparator)));
196196
}
197197
File redirectTo = logFile != null ? logFile.toFile() : new File(System.getProperty("os.name").startsWith("Windows") ? "NULL" : "/dev/null");
198-
processBuilder.redirectOutput(redirectTo);
199-
processBuilder.redirectError(redirectTo);
198+
processBuilder.redirectOutput(ProcessBuilder.Redirect.appendTo(redirectTo));
199+
processBuilder.redirectError(ProcessBuilder.Redirect.appendTo(redirectTo));
200200

201201
pythonProcess = processBuilder.start();
202202
for (int i = 0; i < 30 && pythonProcess.isAlive(); i++) {

0 commit comments

Comments
 (0)