From bebbbaa39433b963ea8a7eb8875023d6861ec4e3 Mon Sep 17 00:00:00 2001 From: James Tansiri Date: Mon, 23 Dec 2024 08:11:55 +0700 Subject: [PATCH] feat: display output even if the execution ends with sigkill --- public/js/lesson.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/lesson.js b/public/js/lesson.js index af1977b..712b91e 100644 --- a/public/js/lesson.js +++ b/public/js/lesson.js @@ -274,6 +274,9 @@ require(["vs/editor/editor.main"], function () { let outputText = ""; if (output.run.signal === "SIGKILL") { outputText = "Code execution failed"; + if (output.run.stdout !== "") { + outputText += ` with output: \n\n${output.run.stdout}`; + } } else { outputText = output.run.stdout + output.run.stderr; }