这是indexloc提供的服务,不要输入任何密码
Skip to content

refactor: move config file discovery to shared util #10677

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025
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
11 changes: 3 additions & 8 deletions crates/turborepo-lib/src/run/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
daemon::{proto, DaemonConnectorError, DaemonError},
get_version, opts,
run::{self, builder::RunBuilder, scope::target_selector::InvalidSelectorError, Run},
turbo_json::{CONFIG_FILE, CONFIG_FILE_JSONC},
turbo_json::resolve_turbo_config_path,
DaemonConnector, DaemonPaths,
};

Expand Down Expand Up @@ -120,14 +120,9 @@ impl WatchClient {
let signal = get_signal()?;
let handler = SignalHandler::new(signal);

// Check if the turbo.json path is the standard one (either turbo.json or
// turbo.jsonc)
let standard_path_json = base.repo_root.join_component(CONFIG_FILE);
let standard_path_jsonc = base.repo_root.join_component(CONFIG_FILE_JSONC);
let standard_config_path = resolve_turbo_config_path(&base.repo_root)?;

if base.opts.repo_opts.root_turbo_json_path != standard_path_json
&& base.opts.repo_opts.root_turbo_json_path != standard_path_jsonc
{
if base.opts.repo_opts.root_turbo_json_path != standard_config_path {
return Err(Error::NonStandardTurboJsonPath(
base.opts.repo_opts.root_turbo_json_path.to_string(),
));
Expand Down
Loading