cli/warning: Add fn obsolete

A helper to print obsoletion warnings to stderr.
This commit is contained in:
Lorenz Leutgeb
2025-09-17 13:32:46 +01:00
committed by Fintan Halpenny
parent 7d1db6a013
commit 8dd17e2a60
+9
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(),
);
}
/// 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(),
);
}