MCPcopy Create free account
hub / github.com/SethGammon/Citadel / withTempProject

Function withTempProject

scripts/test-coordination-core.js:15–22  ·  view source on GitHub ↗
(run)

Source from the content-addressed store, hash-verified

13const { sweepStaleInstances } = require('../core/coordination/sweep');
14
15function withTempProject(run) {
16 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-coordination-'));
17 try {
18 run(dir);
19 } finally {
20 fs.rmSync(dir, { recursive: true, force: true });
21 }
22}
23
24withTempProject((projectRoot) => {
25 const nowMs = Date.now();

Callers 1

Calls 1

runFunction · 0.70

Tested by

no test coverage detected