Skip to content

Commit

Permalink
fix: handle EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jun 22, 2024
1 parent 7e6ba6c commit 325d599
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions worker/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async fn get_output_logged(
let mut buffer = vec![];
loop {
match reader.read_until(b'\n', &mut buffer).await {
// EOF
Ok(0) => break,
Ok(_size) => {
// drop trailing \n
if buffer.ends_with(&[b'\n']) {
Expand Down

0 comments on commit 325d599

Please sign in to comment.