@@ -10,7 +10,7 @@ use std::cmp;
1010use std:: ffi:: OsString ;
1111use std:: io:: { self , Write } ;
1212use std:: process;
13- use uucore:: Args ;
13+ use uucore:: { Args , error :: strip_errno } ;
1414
1515const VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
1616
@@ -44,7 +44,7 @@ Currently defined functions:
4444 if let Err ( e) = writeln ! ( io:: stdout( ) , "{s}" )
4545 && e. kind ( ) != io:: ErrorKind :: BrokenPipe
4646 {
47- let _ = writeln ! ( io:: stderr( ) , "coreutils: {e}" ) ;
47+ let _ = writeln ! ( io:: stderr( ) , "coreutils: {}" , strip_errno ( & e ) ) ;
4848 process:: exit ( 1 ) ;
4949 }
5050}
@@ -95,7 +95,7 @@ fn main() {
9595 if let Err ( e) = writeln ! ( out, "{util}" )
9696 && e. kind ( ) != io:: ErrorKind :: BrokenPipe
9797 {
98- let _ = writeln ! ( io:: stderr( ) , "coreutils: {e}" ) ;
98+ let _ = writeln ! ( io:: stderr( ) , "coreutils: {}" , strip_errno ( & e ) ) ;
9999 process:: exit ( 1 ) ;
100100 }
101101 }
@@ -105,7 +105,7 @@ fn main() {
105105 if let Err ( e) = writeln ! ( io:: stdout( ) , "coreutils {VERSION} (multi-call binary)" )
106106 && e. kind ( ) != io:: ErrorKind :: BrokenPipe
107107 {
108- let _ = writeln ! ( io:: stderr( ) , "coreutils: {e}" ) ;
108+ let _ = writeln ! ( io:: stderr( ) , "coreutils: {}" , strip_errno ( & e ) ) ;
109109 process:: exit ( 1 ) ;
110110 }
111111 process:: exit ( 0 ) ;
0 commit comments