From e89d36d68c8beba2db250833efa97780e2cc03a1 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Thu, 20 Jun 2024 10:15:12 +0800 Subject: [PATCH] fix: fix missing output after merging stdout/stderr --- worker/src/build.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/worker/src/build.rs b/worker/src/build.rs index 4577b93..6291004 100644 --- a/worker/src/build.rs +++ b/worker/src/build.rs @@ -60,7 +60,14 @@ async fn get_output_logged( stdout_out.push(v); } - let output = output.wait_with_output().await?; + let mut output = output.wait_with_output().await?; + + // save data back to output.stdout, since we captured it manually + for line in &stdout_out { + output.stdout.extend_from_slice(line.as_bytes()); + output.stdout.push(b'\n'); + } + let elapsed = begin.elapsed(); logs.extend(