Set PYTHONUNBUFFERED environment variable to ensure unbuffered Python output

This commit is contained in:
2026-05-07 11:19:24 +02:00
parent 95e51abc12
commit 923d6ff1e9

View File

@@ -444,6 +444,7 @@ async fn generate_map(
&mut log_file,
format!(" program: {}", python.to_string_lossy()),
);
write_log_line(&mut log_file, " env: PYTHONUNBUFFERED=1");
for arg in &args {
write_log_line(&mut log_file, format!(" arg: {arg}"));
}
@@ -451,6 +452,7 @@ async fn generate_map(
let mut cmd = Command::new(&python);
cmd.current_dir(&root)
.env("PYTHONUNBUFFERED", "1")
.stdout(Stdio::piped())
.stderr(Stdio::piped());
for arg in &args {