(command, args)
| 125 | } |
| 126 | |
| 127 | async function run(command, args) { |
| 128 | await new Promise((resolve, reject) => { |
| 129 | const proc = spawn(command, args, { stdio: 'inherit' }); |
| 130 | proc.on('close', (code) => { |
| 131 | if (code === 0) { |
| 132 | resolve(); |
| 133 | } else { |
| 134 | reject(new Error(`${command} exited with code ${code}`)); |
| 135 | } |
| 136 | }); |
| 137 | }); |
| 138 | } |
| 139 | |
| 140 | async function copyDir(src, dest) { |
| 141 | const entries = await fs.readdir(src, { withFileTypes: true }); |
no test coverage detected