terminal: core command returning false is reported as command not found #1101

Closed
opened 2026-08-13 14:40:36 +00:00 by spikerj · 1 comment
Owner

TerminalComponent.processLine() rewrites a core command's stdout:

if (stdout === false) {
  stdout = cmd + ": command not found\n";
}

clear returns "", so this arm is dead today. If a core command returns boolean false to signal failure, the user sees "command not found" instead of a failure message. Strict === false (not !stdout) is what keeps clear from being misreported — the false-rewrite itself is still the wrong error for a registered command.

Characterization: terminal.leftovers.spec.ts.

`TerminalComponent.processLine()` rewrites a core command's stdout: ```ts if (stdout === false) { stdout = cmd + ": command not found\n"; } ``` `clear` returns `""`, so this arm is dead today. If a core command returns boolean `false` to signal failure, the user sees **"command not found"** instead of a failure message. Strict `=== false` (not `!stdout`) is what keeps `clear` from being misreported — the false-rewrite itself is still the wrong error for a registered command. Characterization: `terminal.leftovers.spec.ts`.
Author
Owner

Resolved in spikersoft-angular PR #818 (merged to master). A registered command returning false prints "command failed" instead of "command not found". Closing.

Resolved in spikersoft-angular [PR #818](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/818) (merged to `master`). A registered command returning `false` prints "command failed" instead of "command not found". Closing.
Sign in to join this conversation.