903ca504b5
Parser tests are not used anymore, since the parser is now living in a separate package.
18 lines
466 B
JavaScript
18 lines
466 B
JavaScript
const childProcess = require('child_process');
|
|
|
|
module.exports = {
|
|
execNodeJsScriptWithInheritedOutput
|
|
};
|
|
|
|
async function execNodeJsScriptWithInheritedOutput(command, args) {
|
|
return new Promise((resolve, reject) => {
|
|
const child = childProcess.fork(command, args, { stdio: 'inherit' });
|
|
child.on('close', code => {
|
|
if (code !== 0) {
|
|
reject(new Error(`Child process failed with exit-code ${code}`));
|
|
}
|
|
resolve();
|
|
});
|
|
});
|
|
}
|