execstream: make Exit field a pointer again

To support serializing exit codes equal to 0.
This commit is contained in:
Nikolay Edigaryev 2026-02-11 01:03:13 +01:00
parent 8da34cbc06
commit 5686bb183c
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ func (exec *Exec) Run(
// Post an exit event
exitFrame := &execstream.Frame{
Type: execstream.FrameTypeExit,
Exit: execstream.Exit{
Exit: &execstream.Exit{
Code: 0,
},
}

View File

@ -20,12 +20,12 @@ const (
type Frame struct {
Type FrameType `json:"type"`
Data []byte `json:"data,omitempty"`
Exit Exit `json:"exit,omitempty"`
Exit *Exit `json:"exit,omitempty"`
Error string `json:"error,omitempty"`
}
type Exit struct {
Code int32 `json:"code,omitempty"`
Code int32 `json:"code"`
}
func WriteFrame(ctx context.Context, wsConn *websocket.Conn, frame *Frame) error {