diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-18 17:19:14 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-18 17:19:14 +0200 |
| commit | 7e904aec06c09f7fdef0938155d2b9a19d36e314 (patch) | |
| tree | f859e146ad9e34c75d86ebcabefdb70a07ec4db9 /modules/ext/course.js | |
| parent | 267b50588c736fdfec9a53488a2a39c608ebd7d4 (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.js | 5 |
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) {} } |