File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -452,24 +452,26 @@ pub struct Hook;
452452impl Step for Hook {
453453 type Output = ( ) ;
454454 const DEFAULT : bool = true ;
455+
455456 fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
456457 run. alias ( "hook" )
457458 }
459+
458460 fn make_run ( run : RunConfig < ' _ > ) {
459- if run. builder . config . dry_run ( ) {
460- return ;
461- }
462461 if let [ cmd] = & run. paths [ ..] {
463462 if cmd. assert_single_path ( ) . path . as_path ( ) . as_os_str ( ) == "hook" {
464463 run. builder . ensure ( Hook ) ;
465464 }
466465 }
467466 }
467+
468468 fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
469469 let config = & builder. config ;
470- if config. dry_run ( ) {
470+
471+ if config. dry_run ( ) || !config. rust_info . is_managed_git_subrepository ( ) {
471472 return ;
472473 }
474+
473475 t ! ( install_git_hook_maybe( builder, config) ) ;
474476 }
475477}
You can’t perform that action at this time.
0 commit comments