mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore(pty/ptytest): log scanner errors during shutdown (#25485)
This commit is contained in:
committed by
GitHub
parent
0e36c78cc6
commit
a5d5f5b797
@@ -132,6 +132,10 @@ func newExpecter(t *testing.T, r io.Reader, name string) outExpecter {
|
||||
for s.Scan() {
|
||||
ex.logf("%q", stripansi.Strip(s.Text()))
|
||||
}
|
||||
// Surface non-EOF scanner errors; otherwise they're invisible.
|
||||
if err := s.Err(); err != nil {
|
||||
ex.logf("log scanner stopped: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
return ex
|
||||
|
||||
Reference in New Issue
Block a user