Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Aug 19, 2024
1 parent a86a864 commit 2111122
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions crates/turborepo-lib/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::future::Future;

use tracing::error;
use turborepo_telemetry::events::command::CommandEventBuilder;
use turborepo_ui::sender::UISender;

use crate::{commands::CommandBase, run, run::builder::RunBuilder, signal::SignalHandler};

Expand Down Expand Up @@ -52,6 +53,11 @@ pub async fn run(base: CommandBase, telemetry: CommandEventBuilder) -> Result<i3
analytics_handle.close_with_timeout().await;
}

// We only stop if it's the TUI, for the web UI we don't need to stop
if let Some(UISender::Tui(sender)) = sender {
sender.stop();
}

if let Some(handle) = handle {
if let Err(e) = handle.await.expect("render thread panicked") {
error!("error encountered rendering tui: {e}");
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ mod test {
only: opts_input.only,
dry_run: opts_input.dry_run,
graph: None,
ui_mode: UIMode::Tui,
ui_mode: UIMode::Stream,
single_package: false,
log_prefix: crate::opts::ResolvedLogPrefix::Task,
log_order: crate::opts::ResolvedLogOrder::Stream,
Expand Down

0 comments on commit 2111122

Please sign in to comment.