mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-03 18:47:56 +01:00
capture uname
This commit is contained in:
parent
249bf88a4d
commit
b142e350be
@ -64,6 +64,7 @@ type MShellProc struct {
|
||||
// runtime
|
||||
Status string
|
||||
ServerProc *shexec.ClientProc
|
||||
UName string
|
||||
Err error
|
||||
|
||||
RunningCmds []base.CommandKey
|
||||
@ -183,12 +184,15 @@ func (msh *MShellProc) Launch() {
|
||||
defer msh.Lock.Unlock()
|
||||
|
||||
ecmd := convertSSHOpts(msh.Remote.SSHOpts).MakeSSHExecCmd(MShellServerCommand)
|
||||
cproc, err := shexec.MakeClientProc(ecmd)
|
||||
cproc, uname, err := shexec.MakeClientProc(ecmd)
|
||||
msh.UName = uname
|
||||
if err != nil {
|
||||
msh.Status = StatusError
|
||||
msh.Err = err
|
||||
fmt.Printf("[error] connecting remote %s (%s): %w\n", msh.Remote.GetName(), msh.UName, err)
|
||||
return
|
||||
}
|
||||
fmt.Printf("connected remote %s\n", msh.Remote.GetName())
|
||||
msh.ServerProc = cproc
|
||||
msh.Status = StatusConnected
|
||||
go func() {
|
||||
|
Loading…
Reference in New Issue
Block a user