Skip to content

Commit 165b9a3

Browse files
betegonclaude
andcommitted
fix(dsn-cache): replace Bun.file().exists() with stat() in validateFileMtime
Bun.file().exists() can hang on Linux CI (overlayfs/Docker environments). Use stat() from node:fs/promises consistently with validateDirMtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent faa5f7e commit 165b9a3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/lib/db/dsn-cache.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,10 @@ async function validateFileMtime(
253253
cachedMtime: number
254254
): Promise<boolean> {
255255
try {
256-
const file = Bun.file(fullPath);
257-
if (!(await file.exists())) {
258-
return false;
259-
}
260-
return file.lastModified === cachedMtime;
256+
const stats = await stat(fullPath);
257+
return Math.floor(stats.mtimeMs) === cachedMtime;
261258
} catch {
262-
return false;
259+
return false; // File missing or inaccessible — treat as changed
263260
}
264261
}
265262

0 commit comments

Comments
 (0)