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

fix(cache): avoid warning if TURBO_FORCE, TURBO_REMOTE_ONLY, and TURBO_CACHE #9704

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
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
10 changes: 5 additions & 5 deletions crates/turborepo-lib/src/config/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ impl ResolvedConfigurationOptions for EnvVars {
.map(|c| c.parse())
.transpose()?;

// If TURBO_FORCE is set it wins out over TURBO_CACHE
if force.is_some_and(|t| t) {
cache = None;
}

if remote_only.is_some_and(|t| t) {
if let Some(cache) = cache {
// If TURBO_REMOTE_ONLY and TURBO_CACHE result in the same behavior, remove
Expand All @@ -119,6 +114,11 @@ impl ResolvedConfigurationOptions for EnvVars {
}
}

// If TURBO_FORCE is set it wins out over TURBO_CACHE
if force.is_some_and(|t| t) {
cache = None;
}

if remote_only.is_some() {
warn!(
"TURBO_REMOTE_ONLY is deprecated and will be removed in a future major version. \
Expand Down
Loading