File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -146,12 +146,16 @@ macro_rules! write_range_to_hb {
146
146
pub ( crate ) use write_range_to_hb;
147
147
148
148
pub fn check_cmd_output ( out : Output ) -> Result < Output > {
149
- eprint ! ( "{}" , String :: from_utf8_lossy( & out. stdout) ) ;
150
149
if out. status . code ( ) != Some ( 0 ) {
150
+ if !out. stdout . is_empty ( ) {
151
+ eprintln ! ( "stdout:\n {}" , String :: from_utf8_lossy( & out. stdout) ) ;
152
+ }
153
+ if !out. stderr . is_empty ( ) {
154
+ eprintln ! ( "stderr:\n {}" , String :: from_utf8_lossy( & out. stderr) ) ;
155
+ }
151
156
return Err ( Box :: new ( Error :: TestError ( format ! (
152
- "comand output status was not zero. Got:\n stdout: {}\n stderr: {}" ,
153
- String :: from_utf8_lossy( & out. stdout) ,
154
- String :: from_utf8_lossy( & out. stderr) ,
157
+ "command output status was not zero. Got:{:?}" ,
158
+ out. status. code( )
155
159
) ) ) ) ;
156
160
}
157
161
Ok ( out)
You can’t perform that action at this time.
0 commit comments