Skip to content

Commit 51b48e1

Browse files
Merge pull request #27 from theseus-rs/remove-unecessary-command-pipes
chore: remove unnecessary use of command pipes
2 parents 6c2664d + cfed363 commit 51b48e1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

postgresql_embedded/src/command/traits.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::error::Result;
22
use std::ffi::{OsStr, OsString};
33
use std::path::PathBuf;
4-
use std::process::Stdio;
54
use std::time::Duration;
65
use tracing::debug;
76

@@ -93,9 +92,6 @@ impl CommandExecutor for std::process::Command {
9392
/// Execute the command and return the stdout and stderr
9493
async fn execute(&mut self, _timeout: Option<Duration>) -> Result<(String, String)> {
9594
debug!("Executing command: {}", self.to_command_string());
96-
self.stdout(Stdio::piped());
97-
self.stderr(Stdio::piped());
98-
9995
let output = self.output()?;
10096
let stdout = String::from_utf8_lossy(&output.stdout).into_owned();
10197
let stderr = String::from_utf8_lossy(&output.stderr).into_owned();
@@ -123,9 +119,6 @@ impl CommandExecutor for tokio::process::Command {
123119
/// Execute the command and return the stdout and stderr
124120
async fn execute(&mut self, timeout: Option<Duration>) -> Result<(String, String)> {
125121
debug!("Executing command: {}", self.to_command_string());
126-
self.stdout(Stdio::piped());
127-
self.stderr(Stdio::piped());
128-
129122
let output = match timeout {
130123
Some(duration) => tokio::time::timeout(duration, self.output()).await?,
131124
None => self.output().await,

0 commit comments

Comments
 (0)