Use std pipe

This commit is contained in:
mo8it
2025-05-16 11:09:06 +02:00
parent 5ee7dfb5c2
commit 8dff0df266
4 changed files with 15 additions and 27 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
use anyhow::{Context, Result, bail};
use serde::Deserialize;
use std::{
io::Read,
io::{Read, pipe},
path::PathBuf,
process::{Command, Stdio},
};
@@ -17,7 +17,7 @@ fn run_cmd(mut cmd: Command, description: &str, output: Option<&mut Vec<u8>>) ->
};
let mut handle = if let Some(output) = output {
let (mut reader, writer) = os_pipe::pipe().with_context(|| {
let (mut reader, writer) = pipe().with_context(|| {
format!("Failed to create a pipe to run the command `{description}``")
})?;