Skip to content

Commit

Permalink
feat: split messages by \r
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jun 19, 2024
1 parent e705a76 commit cab84e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion worker/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ async fn get_output_logged(

let mut stdout_out = vec![];
while let Ok(Some(v)) = stdout_reader.next_line().await {
tx.clone().into_send_async(Message::Text(v.clone())).await?;
for line in v.split("\r") {
tx.clone()
.into_send_async(Message::Text(line.to_string()))
.await?;
}
stdout_out.push(v);
}

Expand Down

0 comments on commit cab84e5

Please sign in to comment.