From 315c766466d45ca1c482f919c81a21df40ddf900 Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Wed, 23 Oct 2024 17:14:27 -0400 Subject: [PATCH] fix(core): only check if files are in sync if there are no records in the db (#28597) ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes # --- packages/nx/src/native/cache/cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nx/src/native/cache/cache.rs b/packages/nx/src/native/cache/cache.rs index 013eedcfb852e..2def54185744c 100644 --- a/packages/nx/src/native/cache/cache.rs +++ b/packages/nx/src/native/cache/cache.rs @@ -262,7 +262,7 @@ impl NxCache { })? .unwrap_or(false); - if cache_records_exist { + if !cache_records_exist { let hash_regex = Regex::new(r"^\d+$").expect("Hash regex is invalid"); let fs_entries = std::fs::read_dir(&self.cache_path).map_err(anyhow::Error::from)?;