diff --git a/pkg/shexec/shexec.go b/pkg/shexec/shexec.go index bfa3a541..60c6660f 100644 --- a/pkg/shexec/shexec.go +++ b/pkg/shexec/shexec.go @@ -728,6 +728,9 @@ func RunInstallFromCmd(ctx context.Context, ecmd *exec.Cmd, tryDetect bool, mshe case <-ctx.Done(): return ctx.Err() } + if pk == nil { + return fmt.Errorf("no response packet received from client") + } if pk.GetType() == packet.InitPacketStr && firstInit { firstInit = false initPacket := pk.(*packet.InitPacketType)