pub(crate) fn run_command(
    command_string: &str,
    args: &Option<Vec<String>>,
    validate: bool,
) -> Result<i32, CargoMakeError> {
    let output = run_command_get_output(&command_string, &args, false);

    let exit_code = get_exit_code_from_output(&output, !validate);

    if validate {
        validate_exit_code(exit_code)?;
    }

    Ok(exit_code)
}
Runs the requested command and panics in case of any error.
src/lib/command.rs