tests/misc/coreutils.sh: Fail with invalid binary name (#10258)

This commit is contained in:
oech3
2026-02-04 22:11:52 +01:00
committed by GitHub
parent c3eb85f8c8
commit 4854ba692e
3 changed files with 18 additions and 32 deletions
+4 -1
View File
@@ -59,9 +59,12 @@ fn main() {
let util_name = if let Some(&util) = matched_util {
Some(OsString::from(util))
} else {
} else if binary_as_util.ends_with("utils") || binary_as_util.ends_with("box") {
// todo: Remove support of "*box" from binary
uucore::set_utility_is_second_arg();
args.next()
} else {
validation::not_found(&OsString::from(binary_as_util));
};
// 0th argument equals util name?