blob: ae67bc3a65942c9209147ab0a3f41e2906b53cf5 [file] [log] [blame]
//! Exposes process::run_command, a wrapper around platform-native process execution.
#[cfg(unix)]
pub use crate::process_posix::run_command;
#[cfg(windows)]
pub use crate::process_win::run_command;
#[cfg(target_arch = "wasm32")]
fn run_command(
cmdline: &str,
mut output_cb: impl FnMut(&[u8]),
) -> anyhow::Result<(Termination, Vec<u8>)> {
anyhow::bail!("wasm cannot run commands");
}
#[derive(Debug, PartialEq)]
pub enum Termination {
Success,
Interrupted,
Failure,
}