diff --git a/crates/radicle-cli/src/warning.rs b/crates/radicle-cli/src/warning.rs index 7f6703c2..05c02bf4 100644 --- a/crates/radicle-cli/src/warning.rs +++ b/crates/radicle-cli/src/warning.rs @@ -44,3 +44,12 @@ pub(crate) fn nodes_renamed(config: &Config) -> Vec { )); warnings } + +/// Prints a deprecation warning to standard error. +pub(crate) fn deprecated(old: impl std::fmt::Display, new: impl std::fmt::Display) { + eprintln!( + "{} {} The command/option `{old}` is deprecated and will be removed. Please use `{new}` instead.", + radicle_term::PREFIX_WARNING, + radicle_term::Paint::yellow("Deprecated:").bold(), + ); +}