@@ -580,14 +580,12 @@ impl Build {
580580
581581 // Save any local changes, but avoid running `git stash pop` if there are none (since it will exit with an error).
582582 // diff-index reports the modifications through the exit status
583- let has_local_modifications = !self . run_cmd (
584- BootstrapCommand :: from ( submodule_git ( ) . args ( [ "diff-index" , "--quiet" , "HEAD" ] ) )
585- . allow_failure ( )
586- . output_mode ( match self . is_verbose ( ) {
587- true => OutputMode :: All ,
588- false => OutputMode :: OnlyOutput ,
589- } ) ,
590- ) ;
583+ let has_local_modifications = self
584+ . run_tracked (
585+ BootstrapCommand :: from ( submodule_git ( ) . args ( [ "diff-index" , "--quiet" , "HEAD" ] ) )
586+ . allow_failure ( ) ,
587+ )
588+ . is_failure ( ) ;
591589 if has_local_modifications {
592590 self . run ( submodule_git ( ) . args ( [ "stash" , "push" ] ) ) ;
593591 }
@@ -1026,18 +1024,7 @@ impl Build {
10261024
10271025 /// Runs a command, printing out nice contextual information if it fails.
10281026 fn run ( & self , cmd : & mut Command ) {
1029- self . run_cmd ( BootstrapCommand :: from ( cmd) . fail_fast ( ) . output_mode (
1030- match self . is_verbose ( ) {
1031- true => OutputMode :: All ,
1032- false => OutputMode :: OnlyOutput ,
1033- } ,
1034- ) ) ;
1035- }
1036-
1037- /// A centralized function for running commands that do not return output.
1038- pub ( crate ) fn run_cmd < ' a , C : Into < BootstrapCommand < ' a > > > ( & self , cmd : C ) -> bool {
1039- let command = cmd. into ( ) ;
1040- self . run_tracked ( command) . is_success ( )
1027+ self . run_tracked ( BootstrapCommand :: from ( cmd) ) ;
10411028 }
10421029
10431030 /// Check if verbosity is greater than the `level`
0 commit comments