Skip to content

Commit 44b0b8e

Browse files
committed
Only write non-empty lines
1 parent e1683cf commit 44b0b8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/supervisor/output.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ func (m *multiOutput) PipeOutput(proc *process) {
5858
reader := bufio.NewReader(pipe.pty)
5959
for {
6060
line, err := reader.ReadBytes('\n')
61-
62-
// Write to console regardless of whether there's an error.
63-
m.WriteLine(proc, line)
64-
61+
// Only write non-empty lines.
62+
if len(line) > 0 {
63+
m.WriteLine(proc, line)
64+
}
6565
if err != nil {
6666
if err != io.EOF {
6767
log.Printf("reader error: %v", err)

0 commit comments

Comments
 (0)