From 76428cfdb2bb70ff3a81e0971454eeff7f938ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 23 Apr 2025 11:25:08 +0200 Subject: [PATCH] early exit on .meteor/local context --- tools/fs/safe-watcher.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 719638429e..4c793979d8 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -122,6 +122,13 @@ function shouldIgnorePath(absPath: string): boolean { const posixPath = toPosixPath(absPath); const parts = posixPath.split('/'); + const cwd = toPosixPath(process.cwd()); + const isWithinCwd = absPath.startsWith(cwd); + + if (isWithinCwd && absPath.includes(`${cwd}/.meteor/local`)) { + return true; + } + // Check for .meteor: allow the .meteor directory itself, // but ignore its "local" subdirectory (or any immediate child folder that indicates cache). const meteorIndex = parts.indexOf(".meteor"); @@ -134,8 +141,6 @@ function shouldIgnorePath(absPath: string): boolean { // Otherwise, do not automatically ignore .meteor (which includes .meteor/packages, etc). } - const cwd = toPosixPath(process.cwd()); - const isWithinCwd = absPath.startsWith(cwd); if (isWithinCwd) { return absPath.includes(`${cwd}/node_modules`); }