File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use std::os::fd::AsFd;
1919use std:: os:: unix:: fs:: FileTypeExt ;
2020use thiserror:: Error ;
2121use uucore:: display:: Quotable ;
22- use uucore:: error:: UResult ;
22+ use uucore:: error:: { UResult , strip_errno } ;
2323use uucore:: translate;
2424use uucore:: { fast_inc:: fast_inc_one, format_usage} ;
2525
@@ -82,7 +82,7 @@ impl LineNumber {
8282#[ derive( Error , Debug ) ]
8383enum CatError {
8484 /// Wrapper around `io::Error`
85- #[ error( "{0}" ) ]
85+ #[ error( "{}" , strip_errno ( . 0 ) ) ]
8686 Io ( #[ from] io:: Error ) ,
8787 /// Wrapper around `nix::Error`
8888 #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
Original file line number Diff line number Diff line change 11cat: test_directory3/test_directory4: Is a directory
2- cat: file_which_does_not_exist.txt: No such file or directory (os error 2)
2+ cat: file_which_does_not_exist.txt: No such file or directory
33cat: test_directory3/test_directory5: Is a directory
44cat: test_directory3/../test_directory3/test_directory5: Is a directory
55cat: test_directory3: Is a directory
You can’t perform that action at this time.
0 commit comments