mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-21 04:26:28 +02:00
Trim output
This commit is contained in:
parent
bbbea5045a
commit
a2457edc6f
1 changed files with 4 additions and 6 deletions
|
@ -95,13 +95,11 @@ async function launch(res, language, body) {
|
|||
result.output += chunk;
|
||||
});
|
||||
|
||||
result.stderr = result.stderr.substring(0, 65535);
|
||||
result.stdout = result.stdout.substring(0, 65535);
|
||||
result.output = result.output.substring(0, 65535);
|
||||
result.stderr = result.stderr.trim().substring(0, 65535);
|
||||
result.stdout = result.stdout.trim().substring(0, 65535);
|
||||
result.output = result.output.trim().substring(0, 65535);
|
||||
|
||||
process.on('exit', () => {
|
||||
res.json(result);
|
||||
});
|
||||
process.on('exit', () => res.json(result));
|
||||
}
|
||||
|
||||
app.get('/versions', (req, res) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue