From 8dd17e2a608deb2b67d1e09ffb7685b929ab64a5 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Wed, 17 Sep 2025 08:27:27 +0200 Subject: [PATCH] cli/warning: Add `fn obsolete` A helper to print obsoletion warnings to stderr. --- crates/radicle-cli/src/warning.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/radicle-cli/src/warning.rs b/crates/radicle-cli/src/warning.rs index 05c02bf4..926794dd 100644 --- a/crates/radicle-cli/src/warning.rs +++ b/crates/radicle-cli/src/warning.rs @@ -53,3 +53,12 @@ pub(crate) fn deprecated(old: impl std::fmt::Display, new: impl std::fmt::Displa radicle_term::Paint::yellow("Deprecated:").bold(), ); } + +/// Prints an obsoletion warning to standard error. +pub(crate) fn obsolete(command: impl std::fmt::Display) { + eprintln!( + "{} {} The command `{command}` is obsolete and will be removed. Please stop using it.", + radicle_term::PREFIX_WARNING, + radicle_term::Paint::yellow("Obsolete:").bold(), + ); +}