Skip to content

Commit 86202b4

Browse files
committed
feat: convert \r\n, \r to \n
1 parent d3086e8 commit 86202b4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

worker/src/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ async fn get_output_logged(
5252

5353
let mut stdout_out = vec![];
5454
while let Ok(Some(v)) = stdout_reader.next_line().await {
55-
tx.clone().into_send_async(Message::Text(v.clone())).await?;
55+
tx.clone()
56+
.into_send_async(Message::Text(v.replace("\r\n", "\n").replace("\r", "\n")))
57+
.await?;
5658
stdout_out.push(v);
5759
}
5860

@@ -70,7 +72,7 @@ async fn get_output_logged(
7072
)
7173
.as_bytes(),
7274
);
73-
logs.extend("STDOUT/ERR:\n".as_bytes());
75+
logs.extend("STDOUT&STDERR:\n".as_bytes());
7476
logs.extend(stdout_out.join("\n").as_bytes());
7577

7678
Ok(output)

0 commit comments

Comments
 (0)