Merge pull request #10738 from microsoft/danmihai1/empty-pty-lines

runtime: skip empty Guest console output lines
This commit is contained in:
Aurélien Bombo 2025-01-15 10:33:24 -06:00 committed by GitHub
commit 0d93f59f5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1275,13 +1275,16 @@ func (cw *consoleWatcher) start(s *Sandbox) (err error) {
go func() {
for scanner.Scan() {
text := scanner.Text()
if text != "" {
s.Logger().WithFields(logrus.Fields{
"console-protocol": cw.proto,
"console-url": cw.consoleURL,
"sandbox": s.id,
"vmconsole": scanner.Text(),
"vmconsole": text,
}).Debug("reading guest console")
}
}
if err := scanner.Err(); err != nil {
s.Logger().WithError(err).WithFields(logrus.Fields{