mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
fix: run waveshell remotely with chosen shell
This ensures that the appropriate shell is used to run the waveshell command remotely. It hasn't made a difference in my experience but is desired in order to match the local launch.
This commit is contained in:
parent
69d49343c7
commit
5dfb8a816f
@ -1549,13 +1549,15 @@ func (msh *MShellProc) createWaveshellSession(remoteCopy sstore.RemoteType) (she
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ssh cannot create session: %w", err)
|
||||
}
|
||||
wsSession = shexec.SessionWrap{Session: session, StartCmd: MakeServerCommandStr()}
|
||||
cmd := fmt.Sprintf("%s -c %s", sapi.GetLocalShellPath(), shellescape.Quote(MakeServerCommandStr()))
|
||||
wsSession = shexec.SessionWrap{Session: session, StartCmd: cmd}
|
||||
} else {
|
||||
session, err := msh.Client.NewSession()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ssh cannot create session: %w", err)
|
||||
}
|
||||
wsSession = shexec.SessionWrap{Session: session, StartCmd: MakeServerCommandStr()}
|
||||
cmd := fmt.Sprintf(`%s -c %s`, sapi.GetLocalShellPath(), shellescape.Quote(MakeServerCommandStr()))
|
||||
wsSession = shexec.SessionWrap{Session: session, StartCmd: cmd}
|
||||
}
|
||||
return wsSession, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user