File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 66// spell-checker:ignore prefixcat testcat
77
88use std:: ffi:: { OsStr , OsString } ;
9+ use std:: io:: { Write , stderr} ;
910use std:: path:: { Path , PathBuf } ;
1011use std:: process;
1112
@@ -25,13 +26,18 @@ pub fn get_all_utilities<T: Args>(
2526
2627/// Prints a "utility not found" error and exits
2728pub fn not_found ( util : & OsStr ) -> ! {
28- eprintln ! ( "{}: function/utility not found" , util. maybe_quote( ) ) ;
29+ let _ = writeln ! (
30+ stderr( ) ,
31+ "coreutils: unknown program '{}'" ,
32+ util. maybe_quote( )
33+ ) ;
2934 process:: exit ( 1 ) ;
3035}
3136
3237/// Prints an "unrecognized option" error and exits
3338pub fn unrecognized_option ( binary_name : & str , option : & OsStr ) -> ! {
34- eprintln ! (
39+ let _ = writeln ! (
40+ stderr( ) ,
3541 "{binary_name}: unrecognized option '{}'" ,
3642 option. to_string_lossy( )
3743 ) ;
Original file line number Diff line number Diff line change @@ -184,8 +184,6 @@ sed -i 's/^print_ver_.*/require_selinux_/' tests/chcon/chcon-fail.sh
184184
185185# We use coreutils yes
186186sed -i " s|--coreutils-prog=||g" tests/misc/coreutils.sh
187- # Different message
188- sed -i " s|coreutils: unknown program 'blah'|blah: function/utility not found|" tests/misc/coreutils.sh
189187
190188# Use the system coreutils where the test fails due to error in a util that is not the one being tested
191189sed -i " s|grep '^#define HAVE_CAP 1' \$ CONFIG_HEADER > /dev/null|true|" tests/ls/capability.sh
You can’t perform that action at this time.
0 commit comments