Skip to content

Commit

Permalink
chore(watch): warn if daemon is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed Nov 7, 2024
1 parent b65ff15 commit 1428b99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/turborepo-lib/src/run/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use futures::StreamExt;
use miette::{Diagnostic, SourceSpan};
use thiserror::Error;
use tokio::{select, sync::Notify, task::JoinHandle};
use tracing::{instrument, trace};
use tracing::{instrument, trace, warn};
use turborepo_repository::package_graph::PackageName;
use turborepo_telemetry::events::command::CommandEventBuilder;
use turborepo_ui::sender::UISender;
Expand Down Expand Up @@ -113,12 +113,16 @@ impl WatchClient {
pub async fn new(base: CommandBase, telemetry: CommandEventBuilder) -> Result<Self, Error> {
let signal = commands::run::get_signal()?;
let handler = SignalHandler::new(signal);
let root_turbo_json_path = base.config()?.root_turbo_json_path(&base.repo_root);
let config = base.config()?;
let root_turbo_json_path = config.root_turbo_json_path(&base.repo_root);
if root_turbo_json_path != base.repo_root.join_component(CONFIG_FILE) {
return Err(Error::NonStandardTurboJsonPath(
root_turbo_json_path.to_string(),
));
}
if matches!(config.daemon(), Some(false)) {
warn!("daemon is required for watch, ignoring request to disable daemon");
}

let Some(Command::Watch(execution_args)) = &base.args().command else {
unreachable!()
Expand Down

0 comments on commit 1428b99

Please sign in to comment.