MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / ensure_gh_available

Function ensure_gh_available

crates/opencode-cli/src/main.rs:4622–4631  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4620}
4621
4622fn ensure_gh_available() -> anyhow::Result<()> {
4623 let output = ProcessCommand::new("gh")
4624 .arg("--version")
4625 .output()
4626 .map_err(|e| anyhow::anyhow!("Failed to run `gh --version`: {}", e))?;
4627 if !output.status.success() {
4628 anyhow::bail!("GitHub CLI is not available on PATH");
4629 }
4630 Ok(())
4631}
4632
4633fn github_repo_from_payload(payload: &serde_json::Value) -> Option<(String, String)> {
4634 let repo = payload

Callers 1

handle_github_commandFunction · 0.85

Calls 3

newFunction · 0.85
outputMethod · 0.80
successMethod · 0.45

Tested by

no test coverage detected