File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -446,8 +446,6 @@ impl<'a> CargoProcess<'a> {
446446 client. configure ( & mut cmd) ;
447447 }
448448
449- log:: debug!( "{:?}" , cmd) ;
450-
451449 let cmd = tokio:: process:: Command :: from ( cmd) ;
452450 let output = async_command_output ( cmd) . await ?;
453451
Original file line number Diff line number Diff line change @@ -249,23 +249,18 @@ pub async fn async_command_output(
249249) -> anyhow:: Result < process:: Output > {
250250 use anyhow:: Context ;
251251
252+ log:: debug!( "Executing {:?}" , cmd) ;
253+
252254 let start = Instant :: now ( ) ;
253255 let child = cmd
254256 . stdout ( Stdio :: piped ( ) )
255257 . stderr ( Stdio :: piped ( ) )
256258 . spawn ( )
257259 . with_context ( || format ! ( "failed to spawn process for cmd: {:?}" , cmd) ) ?;
258260 let output = child. wait_with_output ( ) . await ?;
259- log:: trace!( "command {cmd:?} took {} ms" , start. elapsed( ) . as_millis( ) ) ;
261+ log:: trace!( "Command took {} ms" , start. elapsed( ) . as_millis( ) ) ;
260262
261- if !output. status . success ( ) {
262- return Err ( anyhow:: anyhow!(
263- "expected success, got {}\n \n stderr={}\n \n stdout={}\n " ,
264- output. status,
265- String :: from_utf8_lossy( & output. stderr) ,
266- String :: from_utf8_lossy( & output. stdout)
267- ) ) ;
268- }
263+ check_command_output ( & output) ?;
269264
270265 Ok ( output)
271266}
You can’t perform that action at this time.
0 commit comments