fix: honor underscore-unused convention and make durability fsyncs cross-platform

- eslint: respect the repo's existing _-prefix convention for unused vars
- phase-one-blockers: derive projectRoot via import.meta.dirname so Windows
  checkouts stop producing C:\C:\... paths
- backup/release-evidence/cutover-orchestrator: skip POSIX-only directory
  fsync on win32 and fsync read-only handles through a writable handle
This commit is contained in:
chick
2026-09-07 01:07:16 +08:00
parent f6319374cd
commit eed134a25c
5 changed files with 28 additions and 12 deletions
+8 -5
View File
@@ -254,11 +254,14 @@ export async function appendReleaseEvidence(
await handle.close();
}
await rename(temporary, absolute);
const directory = await open(parent, 'r');
try {
await directory.sync();
} finally {
await directory.close();
if (process.platform !== 'win32') {
// directory fsync only exists on POSIX
const directory = await open(parent, 'r');
try {
await directory.sync();
} finally {
await directory.close();
}
}
return Object.freeze(record);
} finally {