callisto-graph 0.3.1

Dependency graph, cascade, aggregation, and config resolution for callisto.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::path::Path;

use callisto_model::{check_git_version, CommandError, CommandRunner};

pub fn probe_git<R: CommandRunner>(runner: &R, cwd: &Path) -> Result<(), CommandError> {
    let output = runner.run("git", &["--version"], cwd)?;
    if !output.success() {
        return Err(CommandError::NotFound {
            program: "git".to_string(),
        });
    }
    check_git_version(output.stdout_trimmed())
}