[][src]Function rubric::helpers::cli::cmd

pub fn cmd(command: &str) -> Result<Output, Error>

Runs a command and returns a Result with the output. This is the Windows version.

This is equivilent to using Command, but it handles platform differences for you. This is only meant for basic commands. For anything more advanced than a simple command, use Command yourself.

use rubric::helpers::cli;

let output = cli::cmd("dir");
assert!(output.is_ok());
assert!(output.unwrap().stdout.len() > 0);