MCPcopy Create free account
hub / github.com/dashed/git-chain / check_gh_cli_installed

Function check_gh_cli_installed

src/main.rs:57–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57pub fn check_gh_cli_installed() -> Result<(), git2::Error> {
58 let output = std::process::Command::new("gh").arg("--version").output();
59 match output {
60 Ok(output) if output.status.success() => Ok(()),
61 _ => {
62 eprintln!("The GitHub CLI (gh) is not installed or not found in the PATH.");
63 eprintln!("Please install it from https://cli.github.com/ and ensure it's available in your PATH.");
64 process::exit(1);
65 }
66 }
67}

Callers 2

display_listMethod · 0.85
prMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected