summaryrefslogtreecommitdiff
path: root/src/ninep/pty.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/pty.zig')
-rw-r--r--src/ninep/pty.zig10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig
index e212d67d..65e8589f 100644
--- a/src/ninep/pty.zig
+++ b/src/ninep/pty.zig
@@ -62,12 +62,10 @@ pub fn writeCtl(p: *Pardes, req: Req, id: usize) Reply {
return tree.failText(req.tag, E.NOENT, std.fmt.bufPrint(&p.fs.ename, "exec: {s}: no such directory", .{dir[0..@min(dir.len, 256)]}) catch "exec: no such directory");
// Nor is a shell that is not there, or a script whose
// interpreter is not: refused, and the running shell kept.
- if (comptime pardes.hosted) {
- const bin = pane.shell orelse p.shellBin();
- var why: [320]u8 = undefined;
- if (pardes.tape.value(.shell, @import("../host_io.zig").Shell.refusal, .{ bin[0..@min(bin.len, 200)], &why })) |refused|
- return tree.failText(req.tag, E.NOENT, std.fmt.bufPrint(&p.fs.ename, "exec: {s}", .{refused}) catch "exec: no such shell");
- }
+ const bin = pane.shell orelse p.shellBin();
+ var why: [320]u8 = undefined;
+ if (pardes.tape.value(.shell, @import("../host_io.zig").Shell.refusal, .{ bin[0..@min(bin.len, 200)], &why })) |refused|
+ return tree.failText(req.tag, E.NOENT, std.fmt.bufPrint(&p.fs.ename, "exec: {s}", .{refused}) catch "exec: no such shell");
};
if (verb(p, id, line, apply)) |why| return tree.failText(req.tag, E.INVAL, why);
}