Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/warning: Add `fn deprecate`
Lorenz Leutgeb committed 7 months ago
commit d750525ea9610fc52258b205a6d8c356e0bd18cb
parent 7aa636391f91dea8c421d0c72d17f43a3daa9835
1 file changed +9 -0
modified crates/radicle-cli/src/warning.rs
@@ -44,3 +44,12 @@ pub(crate) fn nodes_renamed(config: &Config) -> Vec<String> {
    ));
    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(),
+
    );
+
}