From 37f98f1f4754da1e3c4ae195f8a241c586584aa1 Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Tue, 22 Oct 2024 00:33:36 -0400 Subject: [PATCH] fix(core): not to cache entire workspace root --- packages/nx/src/native/walker.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nx/src/native/walker.rs b/packages/nx/src/native/walker.rs index 9aba3c083785a..0a1fe49be17ea 100644 --- a/packages/nx/src/native/walker.rs +++ b/packages/nx/src/native/walker.rs @@ -52,7 +52,12 @@ where .filter_map(move |entry| { entry .ok() - .and_then(|e| e.path().strip_prefix(&base_dir).ok().map(|p| p.to_owned())) + .and_then(|e| + e.path() + .strip_prefix(&base_dir).ok() + .filter(|p| !p.to_string_lossy().is_empty()) + .map(|p| p.to_owned()) + ) }) }