import * as child_process from 'child_process'; function execute(command: string, args: ReadonlyArray, cwd?: string): Promise { const p = child_process.spawn(command, [...args], { stdio: 'inherit', shell: true, cwd }); return new Promise((resolve, reject) => { p.on('error', reject); p.on('exit', resolve); p.on('close', resolve); }); } export { execute };