Skip to content

Commit cf8e7c9

Browse files
committed
Ensure exec_command() stdout/stderr stays piped
We use `Stdio::piped()` in virtually every other instance of `tokio::process::Command`. This accidental omission was an oversight.
1 parent 6a40444 commit cf8e7c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/container.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ impl Drop for Container {
150150
}
151151

152152
async fn exec_command(cmd: &mut Command) -> anyhow::Result<()> {
153-
let output = cmd.output().await?;
153+
let output = cmd
154+
.stdout(Stdio::piped())
155+
.stderr(Stdio::piped())
156+
.output()
157+
.await?;
158+
154159
if !output.status.success() {
155160
let stderr = std::str::from_utf8(&output.stderr)?;
156161
return Err(anyhow!("`{:?}` returned: [{}]", cmd, stderr));

0 commit comments

Comments
 (0)