Trim and subtring only after executing
This commit is contained in:
parent
420a104f5c
commit
def096fbea
|
@ -34,11 +34,13 @@ async function execute(res, language, body) {
|
||||||
result.output += chunk;
|
result.output += chunk;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('exit', () => {
|
||||||
result.stderr = result.stderr.trim().substring(0, 65535);
|
result.stderr = result.stderr.trim().substring(0, 65535);
|
||||||
result.stdout = result.stdout.trim().substring(0, 65535);
|
result.stdout = result.stdout.trim().substring(0, 65535);
|
||||||
result.output = result.output.trim().substring(0, 65535);
|
result.output = result.output.trim().substring(0, 65535);
|
||||||
|
|
||||||
process.on('exit', () => res.json(result));
|
res.json(result);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
Loading…
Reference in New Issue