Skip to content

Commit

Permalink
remove unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneary committed Dec 10, 2024
1 parent 8f41f91 commit 277cb4a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions control-plane/src/orchestration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ impl Orchestration {
.stderr(Stdio::piped())
.spawn()?;

let stdout = child.stdout.take().unwrap();
tokio::spawn(async move {
let mut lines = BufReader::new(stdout).lines();
while let Ok(Some(line)) = lines.next_line().await {
info!("[ENCLAVE]: {}", line);
}
});
if let Some(stdout) = child.stdout.take() {
tokio::spawn(async move {
let mut lines = BufReader::new(stdout).lines();
while let Ok(Some(line)) = lines.next_line().await {
info!("[ENCLAVE]: {}", line);
}
});
}
}
}
Ok(())
Expand Down

0 comments on commit 277cb4a

Please sign in to comment.