(filePath, snapshot)
| 108 | } |
| 109 | |
| 110 | async function restoreOptionalFile(filePath, snapshot) { |
| 111 | if (snapshot === null) { |
| 112 | await rm(filePath, { force: true }).catch(() => {}) |
| 113 | return |
| 114 | } |
| 115 | await writeFile(filePath, snapshot, 'utf8') |
| 116 | } |
| 117 | |
| 118 | async function terminate(child) { |
| 119 | if (!child || child.exitCode !== null) { |