Skip to content

Commit

Permalink
fix(cli): warn deprecated arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
loichyan committed Sep 20, 2023
1 parent 8bcd9b4 commit a783b7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ fn main_impl() -> error::Result<()> {
tracing::subscriber::set_global_default(subscriber).context(error::Any)?;

let mut rt = Runtime::builder();
if !args.substitution.is_empty() {
warn!("`--substitution` is deprecated, use `--sub` instead");
}
if !args.replace.is_empty() {
warn!("`--replace` is deprecated, use `--sub prefix:` instead");
}
// ignore builtin database when user provides input
if args.input.is_empty() {
rt.load_input(INDICES).unwrap();
Expand Down Expand Up @@ -122,7 +128,7 @@ fn main_impl() -> error::Result<()> {
source,
} => {
if yes {
warn!("`-y/--yes` is deprecated, use `--write` instead");
warn!("`--yes` is deprecated, use `--write` instead");
}
let rt = rt.build();
let mut context = CheckerContext {
Expand Down

0 comments on commit a783b7e

Please sign in to comment.