Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Apr 19, 2024
1 parent 91db22a commit f916053
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/turborepo-lib/src/run/builder.rs
Expand Up @@ -63,7 +63,7 @@ pub struct RunBuilder {
// We will then prune away any tasks that do not depend on tasks inside
// this package.
entrypoint_package: Option<PackageName>,
should_print_prelude: Option<bool>,
should_print_prelude_override: Option<bool>,
}

impl RunBuilder {
Expand Down Expand Up @@ -115,7 +115,7 @@ impl RunBuilder {
experimental_ui,
analytics_sender: None,
entrypoint_package: None,
should_print_prelude: None,
should_print_prelude_override: None,
})
}

Expand All @@ -124,6 +124,11 @@ impl RunBuilder {
self
}

pub fn hide_prelude(mut self) -> Self {
self.should_print_prelude_override = Some(false);
self
}

fn connect_process_manager(&self, signal_subscriber: SignalSubscriber) {
let manager = self.processes.clone();
tokio::spawn(async move {
Expand All @@ -137,11 +142,6 @@ impl RunBuilder {
self
}

pub fn hide_prelude(mut self) -> Self {
self.should_print_prelude = Some(false);
self
}

// Starts analytics and returns handle. This is not included in the main `build`
// function because we don't want the handle stored in the `Run` struct.
pub fn start_analytics(&self) -> (Option<AnalyticsSender>, Option<AnalyticsHandle>) {
Expand Down Expand Up @@ -395,9 +395,9 @@ impl RunBuilder {
self.opts.run_opts.env_mode = EnvMode::Strict;
}

let should_print_prelude = self
.should_print_prelude
.unwrap_or(self.opts.run_opts.dry_run.is_none() && self.opts.run_opts.graph.is_none());
let should_print_prelude = self.should_print_prelude_override.unwrap_or_else(|| {
self.opts.run_opts.dry_run.is_none() && self.opts.run_opts.graph.is_none()
});

Ok(Run {
version: self.version,
Expand Down

0 comments on commit f916053

Please sign in to comment.