@@ -82,7 +82,7 @@ pub fn cygpath_windows<P: AsRef<Path>>(path: P) -> String {
82
82
cygpath. arg ( path. as_ref ( ) ) ;
83
83
let output = cygpath. output ( ) . unwrap ( ) ;
84
84
if !output. status . success ( ) {
85
- handle_failed_output ( & format ! ( "{:#?}" , cygpath) , output, caller_line_number) ;
85
+ handle_failed_output ( & cygpath, output, caller_line_number) ;
86
86
}
87
87
let s = String :: from_utf8 ( output. stdout ) . unwrap ( ) ;
88
88
// cygpath -w can attach a newline
@@ -98,18 +98,18 @@ pub fn uname() -> String {
98
98
let mut uname = Command :: new ( "uname" ) ;
99
99
let output = uname. output ( ) . unwrap ( ) ;
100
100
if !output. status . success ( ) {
101
- handle_failed_output ( & format ! ( "{:#?}" , uname) , output, caller_line_number) ;
101
+ handle_failed_output ( & uname, output, caller_line_number) ;
102
102
}
103
103
String :: from_utf8 ( output. stdout ) . unwrap ( )
104
104
}
105
105
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 ) -> ! {
107
107
if output. status . success ( ) {
108
- eprintln ! ( "command incorrectly succeeded at line {caller_line_number}" ) ;
108
+ eprintln ! ( "command unexpectedly succeeded at line {caller_line_number}" ) ;
109
109
} else {
110
110
eprintln ! ( "command failed at line {caller_line_number}" ) ;
111
111
}
112
- eprintln ! ( "{cmd}" ) ;
112
+ eprintln ! ( "{cmd:? }" ) ;
113
113
eprintln ! ( "output status: `{}`" , output. status) ;
114
114
eprintln ! ( "=== STDOUT ===\n {}\n \n " , String :: from_utf8( output. stdout) . unwrap( ) ) ;
115
115
eprintln ! ( "=== STDERR ===\n {}\n \n " , String :: from_utf8( output. stderr) . unwrap( ) ) ;
0 commit comments