From e25645b3bbb81c4005afb38ca4631fc423e6a166 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Tue, 11 Aug 2026 16:33:57 +0200 Subject: [PATCH] pull: qol fix, highlight release --- src/package_info.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/package_info.rs b/src/package_info.rs index d410fc4..741192c 100644 --- a/src/package_info.rs +++ b/src/package_info.rs @@ -4,6 +4,7 @@ use std::error::Error; use std::io::Read; use crate::ProgressCallback; +use crossterm::style::Stylize; use log::{debug, warn}; /// Convert a PPA specification to a base URL @@ -358,15 +359,22 @@ async fn find_package( match get(package_name, series, &p, version, base_url).await { Ok(info) => { if i > 0 { + let location = if p.is_empty() { + format!("{}/{}", dist, series).cyan() + } else { + format!("{}/{}-{}", dist, series, p).cyan() + }; warn!( - "Package '{}' not found in development release. Found in {}/{}-{}.", - package_name, dist, series, p + "Package '{}' not found in development release. Found in {}.", + package_name, location ); } else { - debug!( - "Found package '{}' in {}/{}-{}", - package_name, dist, series, p - ); + let location = if p.is_empty() { + format!("{}/{}", dist, series) + } else { + format!("{}/{}-{}", dist, series, p) + }; + debug!("Found package '{}' in {}", package_name, location); } return Ok(info); }