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

Function withTempProject

scripts/test-worktree-readiness.js:19–24  ·  view source on GitHub ↗
(run)

Source from the content-addressed store, hash-verified

17} = require('../core/worktree/readiness');
18
19function withTempProject(run) {
20 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-readiness-'));
21 return Promise.resolve()
22 .then(() => run(dir))
23 .finally(() => fs.rmSync(dir, { recursive: true, force: true }));
24}
25
26function write(filePath, content) {
27 fs.mkdirSync(path.dirname(filePath), { recursive: true });

Callers 1

Calls 1

runFunction · 0.70

Tested by

no test coverage detected