Skip to content

Commit 23d2a57

Browse files
committed
fix: ignore ELOOP errors from symlink cycles in file watcher
1 parent 8c66244 commit 23d2a57

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lib/watcher.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ export function startWatcher(
7878
resolveReady();
7979
});
8080

81-
watcher.on('error', (err: unknown) => {
81+
watcher.on('error', (err: NodeJS.ErrnoException) => {
82+
// Silently ignore symlink loops — nothing useful to watch there
83+
if (err.code === 'ELOOP') return;
8284
process.stderr.write(`[watcher] Watch error: ${err}\n`);
8385
});
8486

0 commit comments

Comments
 (0)