mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
cli/warning: Add fn obsolete
A helper to print obsoletion warnings to stderr.
This commit is contained in:
committed by
Fintan Halpenny
parent
7d1db6a013
commit
8dd17e2a60
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user