This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub enum OutputMode {
1818 /// Print the output (by inheriting stdout/stderr).
1919 PrintOutput ,
2020 /// Suppress the output if the command succeeds, otherwise print the output.
21- Suppress ,
21+ SuppressOnSuccess ,
2222}
2323
2424/// Wrapper around `std::process::Command`.
@@ -43,6 +43,6 @@ impl<'a> BootstrapCommand<'a> {
4343
4444impl < ' a > From < & ' a mut Command > for BootstrapCommand < ' a > {
4545 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 }
4747 }
4848}
Original file line number Diff line number Diff line change @@ -984,14 +984,18 @@ impl Build {
984984
985985 /// Runs a command, printing out nice contextual information if it fails.
986986 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+ ) ;
988990 }
989991
990992 /// Runs a command, printing out nice contextual information if it fails.
991993 /// Exits if the command failed to execute at all, otherwise returns its
992994 /// `status.success()`.
993995 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+ )
995999 }
9961000
9971001 /// A centralized function for running commands that do not return output.
@@ -1012,7 +1016,7 @@ impl Build {
10121016 } ) ,
10131017 matches ! ( mode, OutputMode :: PrintAll ) ,
10141018 ) ,
1015- OutputMode :: Suppress => ( command. command . output ( ) , true ) ,
1019+ OutputMode :: SuppressOnSuccess => ( command. command . output ( ) , true ) ,
10161020 } ;
10171021
10181022 let output = match output {
You can’t perform that action at this time.
0 commit comments