Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(watch): warn if daemon is disabled #9407

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading