(run)
| 18 | } |
| 19 | |
| 20 | function withTempProject(run) { |
| 21 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-pr-ready-')); |
| 22 | try { |
| 23 | return run(dir); |
| 24 | } finally { |
| 25 | fs.rmSync(dir, { recursive: true, force: true }); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | function initGit(projectRoot) { |
| 30 | childProcess.execFileSync('git', ['init'], { cwd: projectRoot, stdio: 'ignore' }); |