From 4ca45d146a1b53980cf6ebadb238145544da49e1 Mon Sep 17 00:00:00 2001 From: Chris Olszewski Date: Tue, 14 Jan 2025 12:42:53 -0500 Subject: [PATCH] fix(cache): avoid warning if TURBO_FORCE, TURBO_REMOTE_ONLY, and TURBO_CACHE are all used --- crates/turborepo-lib/src/config/env.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/turborepo-lib/src/config/env.rs b/crates/turborepo-lib/src/config/env.rs index a1e26988d0b8e..1425f20f95651 100644 --- a/crates/turborepo-lib/src/config/env.rs +++ b/crates/turborepo-lib/src/config/env.rs @@ -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 @@ -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. \