diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:36:16 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | b4172e6bde69eb35648f173f4497054d1fb2e0fc (patch) | |
| tree | c4285a49319eecece03a13b95a5ad5cac1399676 /src | |
| parent | 5715121328de6851d1cc5cd56ab19eb521d4b6fc (diff) | |
| download | pardes-b4172e6bde69eb35648f173f4497054d1fb2e0fc.tar.gz pardes-b4172e6bde69eb35648f173f4497054d1fb2e0fc.zip | |
A build that runs no commands refuses a word that is not a builtin, and says so
Board and web have no spawn. An unknown word there used to fall through to the command path and do nothing visible; now it answers with a failure the caller sees.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/exec.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/exec.zig b/src/exec.zig index 7f2e0e1f..bf3ed1f0 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -556,6 +556,12 @@ pub fn executeFrom(p: *Pardes, id: usize, txt: []const u8, from_body: bool) ?usi /// A pane reused keeps what it showed: the new command runs below a line /// naming it, as acme appends to +Errors and never clears it (util.c:213). fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize { + // The board and the web page start no processes: a command pane there + // would say running for ever, and fill the slots. + if (comptime !hosted) { + p.reportFailure(from, "exec: not a builtin, and this build runs no commands"); + return null; + } if (line.len > command_max) { p.reportFailure(from, "exec: a command line is at most 1024 bytes"); return null; |
