@@ -7,7 +7,7 @@ use clap::builder::ValueParser;
77use clap:: { Arg , ArgAction , Command } ;
88use std:: env;
99use std:: ffi:: { OsStr , OsString } ;
10- use std:: io:: { self , StdoutLock , Write } ;
10+ use std:: io:: { StdoutLock , Write , stdout } ;
1111use uucore:: error:: UResult ;
1212use uucore:: format:: { FormatChar , OctalParsing , parse_escape_only} ;
1313use uucore:: { format_usage, os_str_as_bytes} ;
@@ -166,7 +166,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
166166 uu_app ( ) . print_help ( ) ?;
167167 return Ok ( ( ) ) ;
168168 } else if first_arg == "--version" && args. peek ( ) . is_none ( ) {
169- print ! ( "{}" , uu_app( ) . render_version( ) ) ;
169+ write ! ( stdout ( ) , "{}" , uu_app( ) . render_version( ) ) ? ;
170170 return Ok ( ( ) ) ;
171171 }
172172
@@ -177,7 +177,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
177177 ( Box :: new ( args) , Options :: default ( ) )
178178 } ;
179179
180- execute ( & mut io :: stdout ( ) . lock ( ) , args, options) ?;
180+ execute ( & mut stdout ( ) . lock ( ) , args, options) ?;
181181
182182 Ok ( ( ) )
183183}
0 commit comments