mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
Merge pull request #9588 from oech3/patch-6
coreutils: Print utility not found to stderr
This commit is contained in:
commit
eda7caec73
2 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ pub fn get_all_utilities<T: Args>(
|
|||
|
||||
/// Prints a "utility not found" error and exits
|
||||
pub fn not_found(util: &OsStr) -> ! {
|
||||
println!("{}: function/utility not found", util.maybe_quote());
|
||||
eprintln!("{}: function/utility not found", util.maybe_quote());
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -195,9 +195,9 @@ fn util_invalid_name_invalid_command() {
|
|||
.unwrap();
|
||||
let output = child.wait_with_output().unwrap();
|
||||
assert_eq!(output.status.code(), Some(1));
|
||||
assert_eq!(output.stderr, b"");
|
||||
assert_eq!(output.stdout, b"");
|
||||
assert_eq!(
|
||||
output.stdout,
|
||||
output.stderr,
|
||||
b"definitely_invalid: function/utility not found\n"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue