Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
c016752e4f
commit
c16396db8c
@ -17,11 +17,13 @@ impl CuddleX {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn run(&mut self) -> eyre::Result<(String, String, i32)> {
|
pub async fn run(&mut self) -> eyre::Result<(String, String, i32)> {
|
||||||
let mut cmd = std::process::Command::new("cuddle");
|
let mut cmd = tokio::process::Command::new("cuddle");
|
||||||
|
|
||||||
let cmd = cmd.arg("x").arg(&self.command).args(&self.args);
|
let cmd = cmd.arg("x").arg(&self.command).args(&self.args);
|
||||||
|
|
||||||
let output = cmd.output()?;
|
let process = cmd.spawn()?;
|
||||||
|
|
||||||
|
let output = process.wait_with_output().await?;
|
||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
std::str::from_utf8(&output.stdout)?.to_string(),
|
std::str::from_utf8(&output.stdout)?.to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user