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 772ebdce8894c1d5826e7c840c36e4de1aa18ae7
parent 51632016f5d6a2b7f90cf0ee17fa2aec35b4b5aa
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(),
+
    );
+
}