quick fixes

This commit is contained in:
sawka 2022-08-24 18:56:50 -07:00
parent 0d314000ac
commit 5b1b67cf55
2 changed files with 4 additions and 5 deletions

View File

@ -332,7 +332,6 @@ func RunCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.U
runPacket.CK = base.MakeCommandKey(ids.SessionId, cmdId)
runPacket.Cwd = ids.RemoteState.Cwd
runPacket.Env0 = ids.RemoteState.Env0
fmt.Printf("run-command FOO [%s]\n", shexec.ParseEnv0(ids.RemoteState.Env0)["FOO"])
runPacket.EnvComplete = true
runPacket.UsePty = true
runPacket.TermOpts = &packet.TermOpts{Rows: remote.DefaultTermRows, Cols: remote.DefaultTermCols, Term: remote.DefaultTerm}
@ -668,7 +667,7 @@ func CrCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.Up
return nil, fmt.Errorf("/cr error: cannot update curremote: %w", err)
}
update := sstore.ModelUpdate{
Window: sstore.WindowType{
Window: &sstore.WindowType{
SessionId: ids.SessionId,
WindowId: ids.WindowId,
CurRemote: *rptr,

View File

@ -24,10 +24,10 @@ func (PtyDataUpdate) UpdateType() string {
}
type ModelUpdate struct {
Sessions []*SessionType `json:"sessions"`
Sessions []*SessionType `json:"sessions,omitempty"`
ActiveSessionId string `json:"activesessionid,omitempty"`
Window WindowType `json:"window"`
Line *LineType `json:"line"`
Window *WindowType `json:"window,omitempty"`
Line *LineType `json:"line,omitempty"`
Cmd *CmdType `json:"cmd,omitempty"`
CmdLine *CmdLineType `json:"cmdline,omitempty"`
Info *InfoMsgType `json:"info,omitempty"`