[Shared] Send output to callback for CPP runner

This commit is contained in:
orosmatthew 2024-03-13 20:09:31 -04:00
parent 1a50a42355
commit ba5fa18000

View File

@ -69,10 +69,12 @@ export const runCpp: IRunner<IRunnerParamsCpp> = async function (
child.stdout.setEncoding('utf8'); child.stdout.setEncoding('utf8');
child.stdout.on('data', (data) => { child.stdout.on('data', (data) => {
outputBuffer += data.toString(); outputBuffer += data.toString();
params.outputCallback?.(data.toString());
}); });
child.stderr.setEncoding('utf8'); child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => { child.stderr.on('data', (data) => {
outputBuffer += data.toString(); outputBuffer += data.toString();
params.outputCallback?.(data.toString());
}); });
const runStartTime = performance.now(); const runStartTime = performance.now();