mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
cli/warning: Add fn deprecate
A helper to print deprecation warnings to stderr.
This commit is contained in:
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user