From 4fae02bc85474ab48cfb3636e58a8ba3cf340f71 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Fri, 18 Sep 2026 20:55:56 +0200 Subject: [PATCH] package_info: drop the ANSI color from the not-found warning The location embedded in the log record was styled with crossterm: a remote consumer of pkh's log records would receive ANSI codes inside the message text. Plain text is the logger's business to style. --- src/package_info.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/package_info.rs b/src/package_info.rs index acf0e7d..4bbf672 100644 --- a/src/package_info.rs +++ b/src/package_info.rs @@ -6,7 +6,6 @@ use xz2::read::XzDecoder; use crate::ProgressCallback; use crate::apt::release::{self, VerifiedRelease}; -use crossterm::style::Stylize; use log::{debug, warn}; /// Split a PPA reference into its `(user, name)` parts @@ -524,9 +523,9 @@ async fn find_package( Ok(info) => { if i > 0 { let location = if p.is_empty() { - format!("{}/{}", dist, series).cyan() + format!("{dist}/{series}") } else { - format!("{}/{}-{}", dist, series, p).cyan() + format!("{dist}/{series}-{p}") }; warn!( "Package '{}' not found in development release. Found in {}.",