fix: rename "Unknown option" to "unrecognized option" for diff and cmp (#179)

This commit is contained in:
Ryuji Yasukochi
2026-02-28 21:43:56 +09:00
committed by GitHub
parent 34db0ade7c
commit 6f082c6572
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -217,7 +217,7 @@ pub fn parse_params<I: Iterator<Item = OsString>>(mut opts: Peekable<I>) -> Resu
std::process::exit(0);
}
if param_str.starts_with('-') {
return Err(format!("Unknown option: {param:?}"));
return Err(format!("unrecognized option: {param:?}"));
}
if from.is_none() {
from = Some(param);
+1 -1
View File
@@ -195,7 +195,7 @@ pub fn parse_params<I: Iterator<Item = OsString>>(mut opts: Peekable<I>) -> Resu
Err(error) => return Err(error),
}
if param.to_string_lossy().starts_with('-') {
return Err(format!("Unknown option: {param:?}"));
return Err(format!("unrecognized option: {param:?}"));
}
if from.is_none() {
from = Some(param);
+3 -1
View File
@@ -39,7 +39,9 @@ mod common {
cmd.assert()
.code(predicate::eq(2))
.failure()
.stderr(predicate::str::starts_with("Unknown option: \"--foobar\""));
.stderr(predicate::str::starts_with(
"unrecognized option: \"--foobar\"",
));
}
Ok(())
}