File tree 1 file changed +6
-4
lines changed
src/bootstrap/src/core/build_steps
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -452,24 +452,26 @@ pub struct Hook;
452
452
impl Step for Hook {
453
453
type Output = ( ) ;
454
454
const DEFAULT : bool = true ;
455
+
455
456
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
456
457
run. alias ( "hook" )
457
458
}
459
+
458
460
fn make_run ( run : RunConfig < ' _ > ) {
459
- if run. builder . config . dry_run ( ) {
460
- return ;
461
- }
462
461
if let [ cmd] = & run. paths [ ..] {
463
462
if cmd. assert_single_path ( ) . path . as_path ( ) . as_os_str ( ) == "hook" {
464
463
run. builder . ensure ( Hook ) ;
465
464
}
466
465
}
467
466
}
467
+
468
468
fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
469
469
let config = & builder. config ;
470
- if config. dry_run ( ) {
470
+
471
+ if config. dry_run ( ) || !config. rust_info . is_managed_git_subrepository ( ) {
471
472
return ;
472
473
}
474
+
473
475
t ! ( install_git_hook_maybe( builder, config) ) ;
474
476
}
475
477
}
You can’t perform that action at this time.
0 commit comments