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.
This commit is contained in:
+2
-3
@@ -6,7 +6,6 @@ use xz2::read::XzDecoder;
|
|||||||
|
|
||||||
use crate::ProgressCallback;
|
use crate::ProgressCallback;
|
||||||
use crate::apt::release::{self, VerifiedRelease};
|
use crate::apt::release::{self, VerifiedRelease};
|
||||||
use crossterm::style::Stylize;
|
|
||||||
use log::{debug, warn};
|
use log::{debug, warn};
|
||||||
|
|
||||||
/// Split a PPA reference into its `(user, name)` parts
|
/// Split a PPA reference into its `(user, name)` parts
|
||||||
@@ -524,9 +523,9 @@ async fn find_package(
|
|||||||
Ok(info) => {
|
Ok(info) => {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
let location = if p.is_empty() {
|
let location = if p.is_empty() {
|
||||||
format!("{}/{}", dist, series).cyan()
|
format!("{dist}/{series}")
|
||||||
} else {
|
} else {
|
||||||
format!("{}/{}-{}", dist, series, p).cyan()
|
format!("{dist}/{series}-{p}")
|
||||||
};
|
};
|
||||||
warn!(
|
warn!(
|
||||||
"Package '{}' not found in development release. Found in {}.",
|
"Package '{}' not found in development release. Found in {}.",
|
||||||
|
|||||||
Reference in New Issue
Block a user