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> {
446
446
client. configure ( & mut cmd) ;
447
447
}
448
448
449
- log:: debug!( "{:?}" , cmd) ;
450
-
451
449
let cmd = tokio:: process:: Command :: from ( cmd) ;
452
450
let output = async_command_output ( cmd) . await ?;
453
451
Original file line number Diff line number Diff line change @@ -249,23 +249,18 @@ pub async fn async_command_output(
249
249
) -> anyhow:: Result < process:: Output > {
250
250
use anyhow:: Context ;
251
251
252
+ log:: debug!( "Executing {:?}" , cmd) ;
253
+
252
254
let start = Instant :: now ( ) ;
253
255
let child = cmd
254
256
. stdout ( Stdio :: piped ( ) )
255
257
. stderr ( Stdio :: piped ( ) )
256
258
. spawn ( )
257
259
. with_context ( || format ! ( "failed to spawn process for cmd: {:?}" , cmd) ) ?;
258
260
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( ) ) ;
260
262
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) ?;
269
264
270
265
Ok ( output)
271
266
}
You can’t perform that action at this time.
0 commit comments