(cmd, args)
| 25 | } |
| 26 | |
| 27 | export async function exec(cmd, args) { // eslint-disable-line |
| 28 | let stderr = '' |
| 29 | const cp = await spawn(cmd, args, { stdio: 'pipe', encoding: 'utf8' }) // eslint-disable-line |
| 30 | cp.stderr.on('data', x => stderr += x) |
| 31 | await new Promise(x => cp.on('exit', x)) |
| 32 | if (stderr && !stderr.includes('already exists') && !stderr.includes('does not exist')) |
| 33 | throw new Error(stderr) |
| 34 | } |
no outgoing calls
no test coverage detected