From 5bc607dcec6c7b416fe51d1d6c78f8ee5a2cf4ac Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 23 Apr 2021 20:40:49 +1200 Subject: [PATCH] API compatibility --- api/src/executor/job.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/src/executor/job.js b/api/src/executor/job.js index 44d6358..c0cd1a6 100644 --- a/api/src/executor/job.js +++ b/api/src/executor/job.js @@ -85,6 +85,7 @@ class Job { var stdout = ''; var stderr = ''; + var output = ''; const proc = cp.spawn(proc_call[0], proc_call.splice(1) ,{ env: { @@ -108,6 +109,7 @@ class Job { proc.kill('SIGKILL'); } else { stderr += data; + output += data; } }); @@ -116,6 +118,7 @@ class Job { proc.kill('SIGKILL'); } else { stdout += data; + output += data; } }); @@ -135,13 +138,13 @@ class Job { proc.on('exit', (code, signal)=>{ exit_cleanup(); - resolve({ stdout, stderr, code, signal }); + resolve({ stdout, stderr, code, signal, output }); }); proc.on('error', (err) => { exit_cleanup(); - reject({ error: err, stdout, stderr }); + reject({ error: err, stdout, stderr, output }); }); }); } @@ -177,7 +180,9 @@ class Job { return { compile, - run + run, + language: this.runtime.language, + version: this.runtime.version.raw }; }