send line update via websocket synchronously before calling the cmdwait callback. ensures line arrives on fe client before any command updates or pty updates

This commit is contained in:
sawka
2022-09-05 14:54:17 -07:00
parent 54e0ecffe1
commit a20ee78e6d
+3 -1
View File
@@ -191,7 +191,9 @@ func RunCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.U
if err != nil {
return nil, err
}
return sstore.ModelUpdate{Line: rtnLine, Cmd: cmd}, nil
update := sstore.ModelUpdate{Line: rtnLine, Cmd: cmd, Interactive: pk.Interactive}
sstore.MainBus.SendUpdate(ids.SessionId, update)
return nil, nil
}
func addToHistory(ctx context.Context, pk *scpacket.FeCommandPacketType, update sstore.UpdatePacket, isMetaCmd bool, hadError bool) error {