File tree Expand file tree Collapse file tree 4 files changed +5
-13
lines changed Expand file tree Collapse file tree 4 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -1025,10 +1025,7 @@ impl Config {
1025
1025
}
1026
1026
1027
1027
pub fn dry_run ( & self ) -> bool {
1028
- match self . dry_run {
1029
- DryRun :: Disabled => false ,
1030
- DryRun :: SelfCheck | DryRun :: UserSelected => true ,
1031
- }
1028
+ self . exec_ctx . dry_run ( )
1032
1029
}
1033
1030
1034
1031
pub fn is_explicit_stage ( & self ) -> bool {
@@ -1256,9 +1253,7 @@ impl Config {
1256
1253
1257
1254
/// Runs a function if verbosity is greater than 0
1258
1255
pub fn verbose ( & self , f : impl Fn ( ) ) {
1259
- if self . is_verbose ( ) {
1260
- f ( )
1261
- }
1256
+ self . exec_ctx . verbose ( f) ;
1262
1257
}
1263
1258
1264
1259
pub fn any_sanitizers_to_build ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ fn curl_version(config: &Config) -> semver::Version {
38
38
/// Generic helpers that are useful anywhere in bootstrap.
39
39
impl Config {
40
40
pub fn is_verbose ( & self ) -> bool {
41
- self . verbose > 0
41
+ self . exec_ctx . is_verbose ( )
42
42
}
43
43
44
44
pub ( crate ) fn create < P : AsRef < Path > > ( & self , path : P , s : & str ) {
Original file line number Diff line number Diff line change @@ -673,6 +673,7 @@ impl Build {
673
673
let _sanity_check_span =
674
674
span ! ( tracing:: Level :: DEBUG , "(1) executing dry-run sanity-check" ) . entered ( ) ;
675
675
self . config . dry_run = DryRun :: SelfCheck ;
676
+ self . config . exec_ctx . set_dry_run ( DryRun :: SelfCheck ) ;
676
677
let builder = builder:: Builder :: new ( self ) ;
677
678
builder. execute_cli ( ) ;
678
679
}
@@ -683,6 +684,7 @@ impl Build {
683
684
let _actual_run_span =
684
685
span ! ( tracing:: Level :: DEBUG , "(2) executing actual run" ) . entered ( ) ;
685
686
self . config . dry_run = DryRun :: Disabled ;
687
+ self . config . exec_ctx . set_dry_run ( DryRun :: Disabled ) ;
686
688
let builder = builder:: Builder :: new ( self ) ;
687
689
builder. execute_cli ( ) ;
688
690
}
Original file line number Diff line number Diff line change @@ -51,11 +51,6 @@ impl GitInfo {
51
51
if output. is_failure ( ) {
52
52
return GitInfo :: Absent ;
53
53
}
54
- // Make sure git commands work
55
- // match helpers::git(Some(dir)).arg("rev-parse").as_command_mut().output() {
56
- // Ok(ref out) if out.status.success() => {}
57
- // _ => return GitInfo::Absent,
58
- // }
59
54
60
55
// If we're ignoring the git info, we don't actually need to collect it, just make sure this
61
56
// was a git repo in the first place.
You can’t perform that action at this time.
0 commit comments