pub fn run(args: RunArgs) -> ExitCodeExpand description
Runs the given commands concurrently, prints their results, and returns the highest exit code.
ยงExamples
use conc::{Executable, RunArgs, Show, run, shell_executable};
use std::process::ExitCode;
use std::process::Command;
let mut command = Command::new("echo");
command.arg("one");
let executable1 = Executable {
name: "echo one".into(),
command,
};
let executable2 = shell_executable("echo two");
let args = RunArgs {
executables: vec![executable1, executable2],
error_on_output: false,
stderr_to_stdout: false,
show: Show::All,
};
let exit_code = run(args);
assert_eq!(exit_code, ExitCode::SUCCESS);