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 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();