[Shared] Send output to callback for CPP runner
This commit is contained in:
parent
1a50a42355
commit
ba5fa18000
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user