run_command 0.0.6

standardized way to run shell commands with a compact api.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use tokio::{
    io,
    process::{Child, Command},
};

use crate::CommandOutput;

pub async fn async_run_command(command: &str) -> CommandOutput {
    let output = Command::new("sh").arg("-c").arg(command).output().await;
    CommandOutput::from(output)
}

pub async fn async_spawn_command(command: &str) -> io::Result<Child> {
    Command::new("sh").arg("-c").arg(command).spawn()
}