diff --git a/lib/crates/fabro-cli/src/commands/exec.rs b/lib/crates/fabro-cli/src/commands/exec.rs index 58f5bc2fa..9680e605b 100644 --- a/lib/crates/fabro-cli/src/commands/exec.rs +++ b/lib/crates/fabro-cli/src/commands/exec.rs @@ -220,10 +220,8 @@ fn classify_server_agent_auth(err: anyhow::Error) -> anyhow::Error { .is_some_and(|error| { matches!( error, - fabro_agent::Error::Llm(fabro_llm::Error::Provider { - kind: fabro_llm::ProviderErrorKind::Authentication, - .. - }) + fabro_agent::Error::Llm(llm) + if llm.provider_kind() == Some(ProviderErrorKind::Authentication) ) }) }); diff --git a/lib/crates/fabro-cli/tests/it/support/mod.rs b/lib/crates/fabro-cli/tests/it/support/mod.rs index 8e72f1f62..d2300c7c8 100644 --- a/lib/crates/fabro-cli/tests/it/support/mod.rs +++ b/lib/crates/fabro-cli/tests/it/support/mod.rs @@ -63,13 +63,8 @@ pub(crate) fn run_output_filters(context: &TestContext) -> Vec<(String, String)> } pub(crate) fn fatal_error_line(stderr: &[u8]) -> String { - static ANSI_RE: std::sync::OnceLock = std::sync::OnceLock::new(); - let ansi_re = ANSI_RE.get_or_init(|| { - regex::Regex::new(r"\x1b\[[0-9;]*m").expect("ANSI-stripping regex should compile") - }); let stderr = String::from_utf8_lossy(stderr); - let stripped = ansi_re.replace_all(&stderr, ""); - stripped + console::strip_ansi_codes(&stderr) .lines() .rev() .find_map(|line| line.strip_prefix("error: ").map(ToOwned::to_owned)) diff --git a/lib/crates/fabro-util/src/exit.rs b/lib/crates/fabro-util/src/exit.rs index 4ea6b6966..ecfeae9a3 100644 --- a/lib/crates/fabro-util/src/exit.rs +++ b/lib/crates/fabro-util/src/exit.rs @@ -13,7 +13,7 @@ struct Classified { } impl Classified { - const fn class(&self) -> ExitClass { + fn class(&self) -> ExitClass { self.class } }