mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-08 03:06:26 +02:00
Make ran field do something
This commit is contained in:
parent
f685bdc751
commit
8fd831982e
2 changed files with 9 additions and 4 deletions
|
@ -28,12 +28,17 @@ function execute(language, source, args) {
|
|||
output += chunk;
|
||||
});
|
||||
|
||||
process.on('exit', () => {
|
||||
process.on('exit', code => {
|
||||
stderr = stderr.trim().substring(0, 65535);
|
||||
stdout = stdout.trim().substring(0, 65535);
|
||||
output = output.trim().substring(0, 65535);
|
||||
|
||||
resolve({ stdout, stderr, output });
|
||||
resolve({
|
||||
stdout,
|
||||
stderr,
|
||||
output,
|
||||
ran: code === 0,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue