Files
handlebars.js/tasks/util/exec-file.js
T
Jakob Linskeseder 903ca504b5 Remove unused parser tests
Parser tests are not used anymore, since the parser is
now living in a separate package.
2022-10-14 13:56:17 +02:00

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();
});
});
}