cli/warning: Add `fn obsolete`
A helper to print obsoletion warnings to stderr.
This commit is contained in:
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(),
|
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(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue