cli/warning: Add `fn obsolete`

A helper to print obsoletion warnings to stderr.
This commit is contained in:
Lorenz Leutgeb 2025-09-17 08:27:27 +02:00 committed by Fintan Halpenny
parent 7d1db6a013
commit 8dd17e2a60
1 changed files with 9 additions and 0 deletions

View File

@ -53,3 +53,12 @@ pub(crate) fn deprecated(old: impl std::fmt::Display, new: impl std::fmt::Displa
radicle_term::Paint::yellow("Deprecated:").bold(), 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(),
);
}