mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-18 21:02:00 +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()
|
opts.Cwd = iter.Next()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if argStr == "--debug" {
|
||||||
|
opts.Debug = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if opts.IsSSH {
|
if opts.IsSSH {
|
||||||
// parse SSH opts
|
// parse SSH opts
|
||||||
|
@ -219,6 +219,7 @@ type ClientOpts struct {
|
|||||||
Command string
|
Command string
|
||||||
Fds []packet.RemoteFd
|
Fds []packet.RemoteFd
|
||||||
Cwd string
|
Cwd string
|
||||||
|
Debug bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opts *ClientOpts) MakeRunPacket() *packet.RunPacketType {
|
func (opts *ClientOpts) MakeRunPacket() *packet.RunPacketType {
|
||||||
@ -318,6 +319,9 @@ func RunClientSSHCommandAndWait(opts *ClientOpts) (*packet.CmdDonePacketType, er
|
|||||||
}
|
}
|
||||||
runPacket := opts.MakeRunPacket()
|
runPacket := opts.MakeRunPacket()
|
||||||
sender.SendPacket(runPacket)
|
sender.SendPacket(runPacket)
|
||||||
|
if opts.Debug {
|
||||||
|
cmd.Multiplexer.Debug = true
|
||||||
|
}
|
||||||
remoteDonePacket := cmd.Multiplexer.RunIOAndWait(packetCh, sender, false, true, true)
|
remoteDonePacket := cmd.Multiplexer.RunIOAndWait(packetCh, sender, false, true, true)
|
||||||
donePacket := cmd.WaitForCommand()
|
donePacket := cmd.WaitForCommand()
|
||||||
if remoteDonePacket != nil {
|
if remoteDonePacket != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user