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 @@ -937,14 +937,18 @@ impl Build {
937
937
938
938
/// Runs a command, printing out nice contextual information if it fails.
939
939
fn run_quiet ( & self , cmd : & mut Command ) {
940
- self . run_cmd ( BootstrapCommand :: from ( cmd) . fail_fast ( ) . output_mode ( OutputMode :: Suppress ) ) ;
940
+ self . run_cmd (
941
+ BootstrapCommand :: from ( cmd) . fail_fast ( ) . output_mode ( OutputMode :: SuppressOnSuccess ) ,
942
+ ) ;
941
943
}
942
944
943
945
/// Runs a command, printing out nice contextual information if it fails.
944
946
/// Exits if the command failed to execute at all, otherwise returns its
945
947
/// `status.success()`.
946
948
fn run_quiet_delaying_failure ( & self , cmd : & mut Command ) -> bool {
947
- self . run_cmd ( BootstrapCommand :: from ( cmd) . delay_failure ( ) . output_mode ( OutputMode :: Suppress ) )
949
+ self . run_cmd (
950
+ BootstrapCommand :: from ( cmd) . delay_failure ( ) . output_mode ( OutputMode :: SuppressOnSuccess ) ,
951
+ )
948
952
}
949
953
950
954
/// A centralized function for running commands that do not return output.
@@ -965,7 +969,7 @@ impl Build {
965
969
} ) ,
966
970
matches ! ( mode, OutputMode :: PrintAll ) ,
967
971
) ,
968
- OutputMode :: Suppress => ( command. command . output ( ) , true ) ,
972
+ OutputMode :: SuppressOnSuccess => ( command. command . output ( ) , true ) ,
969
973
} ;
970
974
971
975
let output = match output {
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
}
You can’t perform that action at this time.
0 commit comments