|
1 | 1 | use crate::error::Result;
|
2 | 2 | use std::ffi::{OsStr, OsString};
|
3 | 3 | use std::path::PathBuf;
|
4 |
| -use std::process::Stdio; |
5 | 4 | use std::time::Duration;
|
6 | 5 | use tracing::debug;
|
7 | 6 |
|
@@ -93,9 +92,6 @@ impl CommandExecutor for std::process::Command {
|
93 | 92 | /// Execute the command and return the stdout and stderr
|
94 | 93 | async fn execute(&mut self, _timeout: Option<Duration>) -> Result<(String, String)> {
|
95 | 94 | debug!("Executing command: {}", self.to_command_string());
|
96 |
| - self.stdout(Stdio::piped()); |
97 |
| - self.stderr(Stdio::piped()); |
98 |
| - |
99 | 95 | let output = self.output()?;
|
100 | 96 | let stdout = String::from_utf8_lossy(&output.stdout).into_owned();
|
101 | 97 | let stderr = String::from_utf8_lossy(&output.stderr).into_owned();
|
@@ -123,9 +119,6 @@ impl CommandExecutor for tokio::process::Command {
|
123 | 119 | /// Execute the command and return the stdout and stderr
|
124 | 120 | async fn execute(&mut self, timeout: Option<Duration>) -> Result<(String, String)> {
|
125 | 121 | debug!("Executing command: {}", self.to_command_string());
|
126 |
| - self.stdout(Stdio::piped()); |
127 |
| - self.stderr(Stdio::piped()); |
128 |
| - |
129 | 122 | let output = match timeout {
|
130 | 123 | Some(duration) => tokio::time::timeout(duration, self.output()).await?,
|
131 | 124 | None => self.output().await,
|
|
0 commit comments