summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index f7dd543a..87a4d022 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -1020,10 +1020,10 @@ pub const Tty = struct {
// A shell that is not there is said, where the host would quietly
// start its fallback in its place.
if (comptime pardes.hosted) if (arg.len > 0) {
- var buf: [std.fs.max_path_bytes]u8 = undefined;
- if (@import("host_io.zig").Shell.find(arg, &buf) == null) {
- var said: [320]u8 = undefined;
- return c.p.reportFailure(c.id, std.fmt.bufPrint(&said, "Tty: no shell \"{s}\" (a name on the usual paths, or a path to one)", .{arg[0..@min(arg.len, 200)]}) catch "Tty: no such shell");
+ var why: [320]u8 = undefined;
+ if (@import("host_io.zig").Shell.refusal(arg[0..@min(arg.len, 200)], &why)) |refused| {
+ var said: [340]u8 = undefined;
+ return c.p.reportFailure(c.id, std.fmt.bufPrint(&said, "Tty: {s}", .{refused}) catch "Tty: no such shell");
}
};
const pane = exec.spawnTty(c.p, c.id) orelse return;