mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-31 18:18:02 +01:00
packet debugging with --debug
This commit is contained in:
parent
43ed95f8fc
commit
935500f1f1
@ -298,6 +298,10 @@ func parseClientOpts() (*shexec.ClientOpts, error) {
|
||||
opts.Cwd = iter.Next()
|
||||
continue
|
||||
}
|
||||
if argStr == "--debug" {
|
||||
opts.Debug = true
|
||||
continue
|
||||
}
|
||||
}
|
||||
if opts.IsSSH {
|
||||
// parse SSH opts
|
||||
|
@ -219,6 +219,7 @@ type ClientOpts struct {
|
||||
Command string
|
||||
Fds []packet.RemoteFd
|
||||
Cwd string
|
||||
Debug bool
|
||||
}
|
||||
|
||||
func (opts *ClientOpts) MakeRunPacket() *packet.RunPacketType {
|
||||
@ -318,6 +319,9 @@ func RunClientSSHCommandAndWait(opts *ClientOpts) (*packet.CmdDonePacketType, er
|
||||
}
|
||||
runPacket := opts.MakeRunPacket()
|
||||
sender.SendPacket(runPacket)
|
||||
if opts.Debug {
|
||||
cmd.Multiplexer.Debug = true
|
||||
}
|
||||
remoteDonePacket := cmd.Multiplexer.RunIOAndWait(packetCh, sender, false, true, true)
|
||||
donePacket := cmd.WaitForCommand()
|
||||
if remoteDonePacket != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user