File tree 2 files changed +9
-5
lines changed 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub enum OutputMode {
18
18
/// Print the output (by inheriting stdout/stderr).
19
19
PrintOutput ,
20
20
/// Suppress the output if the command succeeds, otherwise print the output.
21
- Suppress ,
21
+ SuppressOnSuccess ,
22
22
}
23
23
24
24
/// Wrapper around `std::process::Command`.
@@ -43,6 +43,6 @@ impl<'a> BootstrapCommand<'a> {
43
43
44
44
impl < ' a > From < & ' a mut Command > for BootstrapCommand < ' a > {
45
45
fn from ( command : & ' a mut Command ) -> Self {
46
- Self { command, failure_behavior : None , output_mode : OutputMode :: Suppress }
46
+ Self { command, failure_behavior : None , output_mode : OutputMode :: SuppressOnSuccess }
47
47
}
48
48
}
Original file line number Diff line number Diff line change @@ -984,14 +984,18 @@ impl Build {
984
984
985
985
/// Runs a command, printing out nice contextual information if it fails.
986
986
fn run_quiet ( & self , cmd : & mut Command ) {
987
- self . run_cmd ( BootstrapCommand :: from ( cmd) . fail_fast ( ) . output_mode ( OutputMode :: Suppress ) ) ;
987
+ self . run_cmd (
988
+ BootstrapCommand :: from ( cmd) . fail_fast ( ) . output_mode ( OutputMode :: SuppressOnSuccess ) ,
989
+ ) ;
988
990
}
989
991
990
992
/// Runs a command, printing out nice contextual information if it fails.
991
993
/// Exits if the command failed to execute at all, otherwise returns its
992
994
/// `status.success()`.
993
995
fn run_quiet_delaying_failure ( & self , cmd : & mut Command ) -> bool {
994
- self . run_cmd ( BootstrapCommand :: from ( cmd) . delay_failure ( ) . output_mode ( OutputMode :: Suppress ) )
996
+ self . run_cmd (
997
+ BootstrapCommand :: from ( cmd) . delay_failure ( ) . output_mode ( OutputMode :: SuppressOnSuccess ) ,
998
+ )
995
999
}
996
1000
997
1001
/// A centralized function for running commands that do not return output.
@@ -1012,7 +1016,7 @@ impl Build {
1012
1016
} ) ,
1013
1017
matches ! ( mode, OutputMode :: PrintAll ) ,
1014
1018
) ,
1015
- OutputMode :: Suppress => ( command. command . output ( ) , true ) ,
1019
+ OutputMode :: SuppressOnSuccess => ( command. command . output ( ) , true ) ,
1016
1020
} ;
1017
1021
1018
1022
let output = match output {
You can’t perform that action at this time.
0 commit comments