From 1ab4e5c2df374adb4ce0d947b5c369cd83a7bc4c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Mar 2026 13:59:44 +0000 Subject: [PATCH 1/2] Fix CI failures due to RUST_BACKTRACE and commit signing - Replace `fn main() -> Result<()>` with a manual error handler so stderr output is always just "Error: ", not influenced by RUST_BACKTRACE=1 (which appends a full stack trace via anyhow). - Disable commit.gpgsign in test repos created by setup_repo, so git commit succeeds even when the global config requires signing. https://claude.ai/code/session_016hS6jF1xWduLbDRKyBnFh2 --- src/main.rs | 9 ++++++++- tests/common/mod.rs | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 66205ba..e261ad1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,14 @@ use tabled::{builder::Builder, settings::Style}; use codeowners::{explain_owners, get_diff, get_owners, GitRef}; -fn main() -> Result<()> { +fn main() { + if let Err(e) = run() { + eprintln!("Error: {e}"); + std::process::exit(1); + } +} + +fn run() -> Result<()> { let cli = Cli::parse(); match cli.command { diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 21c1bbd..3f2b24f 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -24,6 +24,12 @@ pub fn setup_repo(codeowners: &str, files: &[&str]) -> TempDir { .output() .unwrap(); + Command::new("git") + .args(["config", "commit.gpgsign", "false"]) + .current_dir(dir.path()) + .output() + .unwrap(); + dir.child(".github/CODEOWNERS") .write_str(codeowners) .unwrap(); From 1383f03368f4ea0f2dee0f5b865a180c1ac55caa Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Mar 2026 14:00:37 +0000 Subject: [PATCH 2/2] Ignore insta pending snapshot files https://claude.ai/code/session_016hS6jF1xWduLbDRKyBnFh2 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4fd92fe..4d12f9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target .claude/settings.local.json +tests/*.pending-snap