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 8dd17e2a608deb2b67d1e09ffb7685b929ab64a5
parent 7d1db6a0131e560589a4b25f5d472fdf23998a67
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(),
+
    );
+
}