Skip to content

Commit 6f082c6

Browse files
authored
fix: rename "Unknown option" to "unrecognized option" for diff and cmp (#179)
1 parent 34db0ad commit 6f082c6

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/cmp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pub fn parse_params<I: Iterator<Item = OsString>>(mut opts: Peekable<I>) -> Resu
217217
std::process::exit(0);
218218
}
219219
if param_str.starts_with('-') {
220-
return Err(format!("Unknown option: {param:?}"));
220+
return Err(format!("unrecognized option: {param:?}"));
221221
}
222222
if from.is_none() {
223223
from = Some(param);

src/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pub fn parse_params<I: Iterator<Item = OsString>>(mut opts: Peekable<I>) -> Resu
195195
Err(error) => return Err(error),
196196
}
197197
if param.to_string_lossy().starts_with('-') {
198-
return Err(format!("Unknown option: {param:?}"));
198+
return Err(format!("unrecognized option: {param:?}"));
199199
}
200200
if from.is_none() {
201201
from = Some(param);

tests/integration.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ mod common {
3939
cmd.assert()
4040
.code(predicate::eq(2))
4141
.failure()
42-
.stderr(predicate::str::starts_with("Unknown option: \"--foobar\""));
42+
.stderr(predicate::str::starts_with(
43+
"unrecognized option: \"--foobar\"",
44+
));
4345
}
4446
Ok(())
4547
}

0 commit comments

Comments
 (0)