Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/warning: Add `fn obsolete`
Lorenz Leutgeb committed 7 months ago
commit a27d5e1f47489bef524b1e28084a1564bd4c205c
parent 59156c169618267077687d23e9fe5363ce3fa160
1 file changed +9 -0
modified crates/radicle-cli/src/warning.rs
@@ -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(),
+
    );
+
}