@@ -82,7 +82,7 @@ pub fn cygpath_windows<P: AsRef<Path>>(path: P) -> String {
8282 cygpath. arg ( path. as_ref ( ) ) ;
8383 let output = cygpath. output ( ) . unwrap ( ) ;
8484 if !output. status . success ( ) {
85- handle_failed_output ( & format ! ( "{:#?}" , cygpath) , output, caller_line_number) ;
85+ handle_failed_output ( & cygpath, output, caller_line_number) ;
8686 }
8787 let s = String :: from_utf8 ( output. stdout ) . unwrap ( ) ;
8888 // cygpath -w can attach a newline
@@ -98,18 +98,18 @@ pub fn uname() -> String {
9898 let mut uname = Command :: new ( "uname" ) ;
9999 let output = uname. output ( ) . unwrap ( ) ;
100100 if !output. status . success ( ) {
101- handle_failed_output ( & format ! ( "{:#?}" , uname) , output, caller_line_number) ;
101+ handle_failed_output ( & uname, output, caller_line_number) ;
102102 }
103103 String :: from_utf8 ( output. stdout ) . unwrap ( )
104104}
105105
106- fn handle_failed_output ( cmd : & str , output : Output , caller_line_number : u32 ) -> ! {
106+ fn handle_failed_output ( cmd : & Command , output : Output , caller_line_number : u32 ) -> ! {
107107 if output. status . success ( ) {
108- eprintln ! ( "command incorrectly succeeded at line {caller_line_number}" ) ;
108+ eprintln ! ( "command unexpectedly succeeded at line {caller_line_number}" ) ;
109109 } else {
110110 eprintln ! ( "command failed at line {caller_line_number}" ) ;
111111 }
112- eprintln ! ( "{cmd}" ) ;
112+ eprintln ! ( "{cmd:? }" ) ;
113113 eprintln ! ( "output status: `{}`" , output. status) ;
114114 eprintln ! ( "=== STDOUT ===\n {}\n \n " , String :: from_utf8( output. stdout) . unwrap( ) ) ;
115115 eprintln ! ( "=== STDERR ===\n {}\n \n " , String :: from_utf8( output. stderr) . unwrap( ) ) ;
0 commit comments