From 584c7069511dd7045da509873ed4a299a5949342 Mon Sep 17 00:00:00 2001 From: plondon Date: Sat, 23 Oct 2021 12:17:05 -0400 Subject: [PATCH] Log process kill err --- backend/api.js | 10 ++++++---- backend/test-runner.js | 2 -- backend/util.js | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/api.js b/backend/api.js index 4f2b055..addb842 100644 --- a/backend/api.js +++ b/backend/api.js @@ -293,6 +293,10 @@ export class Session { try { process.kill(this.term.pty.pid); } catch (err) { + this.send({ + event: 'error doing process.kill', + err + }) // process might have already exited } // Signal to terminalOutput message generator using closure. @@ -306,12 +310,10 @@ export class Session { if (compile) { cmdline = `( ${compile} ) && ( ${run} )`; } - } else if (repl && !expectedOutput) { + } else if (repl) { cmdline = repl; } else { - cmdline = expectedOutput - ? "Test runner" - : `echo '${name} has no REPL, press Run to see it in action'`; + cmdline = `echo '${name} has no REPL, press Run to see it in action'`; } if (code === undefined) { code = createEmpty !== undefined ? createEmpty : template + "\n"; diff --git a/backend/test-runner.js b/backend/test-runner.js index e1ba914..01962c7 100644 --- a/backend/test-runner.js +++ b/backend/test-runner.js @@ -578,8 +578,6 @@ async function getImageHash(tag) { } ).output; if (!output) return; - console.log('output config', JSON.parse(output)[0].Config) - // console.log('image hash', output.Config.Labels["riju.image-hash"]) return JSON.parse(output)[0].Config.Labels["riju.image-hash"]; } diff --git a/backend/util.js b/backend/util.js index 6e672e8..17805c8 100644 --- a/backend/util.js +++ b/backend/util.js @@ -77,7 +77,6 @@ export async function run(args, log, options) { proc.on("error", reject); proc.on("close", (code, signal) => { output = output.trim(); - console.log(output) if (output && !suppressOutput) { log(`Output from ${args[0]}:\n` + output); }