aboutsummaryrefslogtreecommitdiff
path: root/modules/ext/course.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-18 17:19:14 +0200
committerAgando <roduccomm@gmail.com>2026-10-18 17:19:14 +0200
commit240e22bc2e4f6b67b032c0a317e456958520fe90 (patch)
treeab2bd5ab291388dbbdf05386b891ac90f0dbe59a /modules/ext/course.js
parent0cee9cbeaef95c4fbd0d6118eff6240aa2e4f282 (diff)
newOS4 v4.6.40: review fixes (bug diagnostics, trash tree, dir paste, stale capture, preview)
Diffstat (limited to 'modules/ext/course.js')
-rw-r--r--modules/ext/course.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ext/course.js b/modules/ext/course.js
index d3b96de..8c615ec 100644
--- a/modules/ext/course.js
+++ b/modules/ext/course.js
@@ -177,7 +177,10 @@ class CourseModule {
if (cmd === 'course') return;
// Only capture while an exercise is actually running. Capturing every command
// swallowed all terminal output (pwd/help/version printed nothing).
- if (!this._active || !this._active.lesson || !this._active.lesson.exercise) return;
+ if (!this._active || !this._active.lesson || !this._active.lesson.exercise) {
+ this._capOut = ''; // never let a previous command's output satisfy an output-check exercise
+ return;
+ }
if (this._capActive) {
try { this.terminal._popPrintCapture(); } catch (e) {}
if (this._capOut) { try { this.terminal.print(this._capOut.replace(/\n+$/, '')); } catch (e) {} }