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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user