(args: &[&str])
| 4832 | } |
| 4833 | |
| 4834 | fn git_output(args: &[&str]) -> anyhow::Result<String> { |
| 4835 | let output = ProcessCommand::new("git") |
| 4836 | .args(args) |
| 4837 | .output() |
| 4838 | .map_err(|e| anyhow::anyhow!("Failed to run git {:?}: {}", args, e))?; |
| 4839 | if !output.status.success() { |
| 4840 | let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string(); |
| 4841 | anyhow::bail!("git {:?} failed: {}", args, stderr); |
| 4842 | } |
| 4843 | Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()) |
| 4844 | } |
| 4845 | |
| 4846 | fn gh_run(args: &[&str], token: Option<&str>) -> anyhow::Result<()> { |
| 4847 | let mut cmd = ProcessCommand::new("gh"); |
no test coverage detected