33// For the full copyright and license information, please view the LICENSE
44// file that was distributed with this source code.
55
6- // spell-checker:ignore (ToDO) autoformat FILENUM whitespaces pairable unpairable nocheck memmem
6+ // spell-checker:ignore (ToDO) autoformat FILENUM whitespaces nocheck memmem
77
88use clap:: builder:: ValueParser ;
99use clap:: { Arg , ArgAction , Command } ;
@@ -18,12 +18,11 @@ use std::os::unix::ffi::OsStrExt;
1818use thiserror:: Error ;
1919use uucore:: display:: Quotable ;
2020use uucore:: error:: { FromIo , UError , UResult , USimpleError , set_exit_code} ;
21- use uucore:: format_usage;
2221use uucore:: i18n:: collator:: {
2322 AlternateHandling , CollatorOptions , locale_cmp, should_use_locale_collation, try_init_collator,
2423} ;
2524use uucore:: line_ending:: LineEnding ;
26- use uucore:: translate;
25+ use uucore:: { format_usage , show_error , translate} ;
2726
2827#[ derive( Debug , Error ) ]
2928enum JoinError {
@@ -650,7 +649,7 @@ impl<'a> State<'a> {
650649 if input. check_order == CheckOrder :: Enabled {
651650 return Err ( JoinError :: UnorderedInput ( err_msg) ) ;
652651 }
653- eprintln ! ( "{}: { err_msg}" , uucore :: execution_phrase ( ) ) ;
652+ show_error ! ( "{err_msg}" ) ;
654653 self . has_failed = true ;
655654 }
656655
@@ -1096,11 +1095,7 @@ fn exec<Sep: Separator>(
10961095 writer. flush ( ) ?;
10971096
10981097 if state1. has_failed || state2. has_failed {
1099- eprintln ! (
1100- "{}: {}" ,
1101- uucore:: execution_phrase( ) ,
1102- translate!( "join-error-input-not-sorted" )
1103- ) ;
1098+ show_error ! ( "{}" , translate!( "join-error-input-not-sorted" ) ) ;
11041099 set_exit_code ( 1 ) ;
11051100 }
11061101 Ok ( ( ) )
0 commit comments