use std::{ffi::OsStr, io::Error, process::Output}; /// An asynchronous wrapper around running and getting command output pub async fn run(program: S, args: I) -> Result where I: IntoIterator, S: AsRef, { #[cfg(not(feature = "tokio"))] return async_process::Command::new(program) .args(args) .output() .await; #[cfg(feature = "tokio")] return tokio::process::Command::new(program) .args(args) .output() .await; }