mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #9588 from oech3/patch-6
coreutils: Print utility not found to stderr
This commit is contained in:
@@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user