diff options
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/exec.zig b/src/exec.zig index 73413910..c2d1be21 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -348,6 +348,10 @@ fn spawnTtyWithMount(p: *Pardes, from: usize, v9fs: bool) ?*Pane { return null; }; const nt = p.newShell(free, p.execDir(from)) catch |err| { + if (err == error.PathTooLong) { + p.reportFailure(from, std.fmt.comptimePrint("Tty: its directory is longer than a path may be ({d} bytes)", .{pardes.memory.limits.host_path_cap})); + return null; + } p.reportError(from, "Tty", err); return null; }; @@ -663,7 +667,7 @@ fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize { if (panes.Terminal.onAlternateScreen(pane)) panes.Terminal.feedOutput(p, pane, "\x1b[?1049l"); panes.Terminal.feedOutput(p, pane, "\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?2004l\x1b[?25h\x1b[0m"); echoCommand(p, pane, line); - p.emit(.{ .spawn = .{ .pane = @intCast(id), .serial = pane.serial, .cwd = .from(pane.cwdSlice()) } }); + p.emitSpawn(id, pane.serial, pane.cwdSlice()); noteRun(p, pane, "run", line); return id; } |
