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