(args: [&str; N])
| 48 | } |
| 49 | |
| 50 | fn run_xcrun<const N: usize>(args: [&str; N]) -> anyhow::Result<Output> { |
| 51 | let output = Command::new("xcrun") |
| 52 | .args(args) |
| 53 | .output() |
| 54 | .context("run xcrun")?; |
| 55 | if output.status.success() { |
| 56 | Ok(output) |
| 57 | } else { |
| 58 | bail_with_output(&format!("xcrun {}", args.join(" ")), output) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | fn bail_with_output(command: &str, output: Output) -> anyhow::Result<Output> { |
| 63 | let stderr = String::from_utf8_lossy(&output.stderr).trim().to_owned(); |
no test coverage detected