Skip to content

Commit

Permalink
fix(core): only check if files are in sync if there are no records in…
Browse files Browse the repository at this point in the history
… the db (#28597)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
Cammisuli authored Oct 23, 2024
1 parent b6a3414 commit 7f92efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nx/src/native/cache/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;

Expand Down

0 comments on commit 7f92efa

Please sign in to comment.