From d6f9931c4b4a7cd3d2124ece93fea7288859b997 Mon Sep 17 00:00:00 2001 From: Dudu-0223 Date: Mon, 24 Aug 2026 21:20:23 +0800 Subject: [PATCH] test(spill-local): exclude POSIX identity branches on Windows --- packages/spill/spill-local/src/cleanup.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/spill/spill-local/src/cleanup.ts b/packages/spill/spill-local/src/cleanup.ts index f108d6b9a1..cbe9fbe307 100644 --- a/packages/spill/spill-local/src/cleanup.ts +++ b/packages/spill/spill-local/src/cleanup.ts @@ -48,14 +48,20 @@ function isTrustedDirectory(stats: Stats): boolean { if (!stats.isDirectory()) return false /* v8 ignore next -- POSIX ownership and mode bits have no Windows equivalent. */ if (process.platform === 'win32' || process.geteuid === undefined) return true + /* v8 ignore start -- Windows takes the return above; POSIX tests exercise + owner and mode rejection. */ return stats.uid === process.geteuid() && (stats.mode & 0o022) === 0 + /* v8 ignore stop */ } /** Stable identity for de-duplicating aliases of one root. */ function rootIdentity(path: string, stats: Stats): string { /* v8 ignore next -- Windows file indexes are not portable inode identities. */ if (process.platform === 'win32') return path.toLowerCase() + /* v8 ignore start -- Windows uses the canonical path identity above; POSIX + tests exercise device and inode identity. */ return `${String(stats.dev)}:${String(stats.ino)}` + /* v8 ignore stop */ } /**