From c3c3ef27ede2f69ef4f8c6acb10808f02ee46bb2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 11:48:32 -0300 Subject: A builtin or setting this build lacks is refused GUI-only, from an exec too On a terminal, Fonts written to an exec was no builtin there, so it ran as a shell command and ended exit 127; ctl said unknown control message. Both now say Fonts is GUI-only, invalid here (a builtin another platform's build has, not in this build). Co-Authored-By: Claude Opus 5.5 --- src/exec.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/exec.zig') diff --git a/src/exec.zig b/src/exec.zig index 9ec6a426..cf4e01ab 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -657,6 +657,14 @@ pub fn executeFrom(p: *Pardes, id: usize, txt: []const u8, from_body: bool) ?usi .sent => |to| return to, .asked => return null, }; + // A builtin or setting this build lacks (Fonts on a terminal) is said, + // never run as a shell command. + const word = cmd[0 .. std.mem.indexOfAny(u8, cmd, " \t") orelse cmd.len]; + if (builtins.absentWhy(word) orelse if (config.Runtime.find(word) != null) @as([]const u8, "GUI-only") else null) |why| { + var said: [96]u8 = undefined; + p.reportFailure(id, std.fmt.bufPrint(&said, "{s} is {s}, invalid here", .{ word, why }) catch "GUI-only, invalid here"); + return null; + } if (!takesCommandLine(p, id)) return runCommand(p, id, cmd); panes.Terminal.padOutputBelowEdits(p, id); panes.Terminal.noteCommand(pane, cmd); -- cgit v1.3