use std::path::Path;
use std::process::Command;
use anyhow::Context;
use command_group::CommandGroup;
pub fn run(exe_path: &Path, args: Vec<String>) -> anyhow::Result<i32> {
let mut child = Command::new(exe_path)
.args(args)
.group_spawn()
.with_context(|| format!("Could not spawn {}", exe_path.display()))?;
let status = child.wait()?;
Ok(status.code().unwrap_or(1))
}