╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │362 return ssh.formatFingerprint(blob_buf[0..blob_len]); │ │363 } │ │364 │ │365 -// write an error to the client and exit non-zero │ │365 +// write an error to the client's stderr and exit non-zero. stderr (not stdout)│ │366 +// because the git exec sessions that call this carry the pack protocol on │ │367 +// stdout, where stray text breaks the client's pkt-line parser. │ │368 fn writeError(sess: *ssh.SessionCtx, msg: []const u8) !void { │ │369 var buf: [256]u8 = undefined; │ │370 const text = try std.fmt.bufPrint(&buf, "haxy ssh: {s}\n", .{msg}); │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────╮ │369 - try sess.writeBytes(text); │ │371 + try sess.writeStderr(text);│ │372 try sess.exit(1); │ │373 } │ │374 │ ╰────────────────────────────────────╯