Skip to content

Commit 6268f39

Browse files
committed
Do not output empty lines if the message is empty
1 parent a596028 commit 6268f39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: internal/arduino/builder/logger/logger.go

+6
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ func New(stdout, stderr io.Writer, verbosity Verbosity, warningsLevel string) *B
6262

6363
// Info fixdoc
6464
func (l *BuilderLogger) Info(msg string) {
65+
if msg == "" {
66+
return
67+
}
6568
l.stdLock.Lock()
6669
defer l.stdLock.Unlock()
6770
fmt.Fprintln(l.stdout, msg)
6871
}
6972

7073
// Warn fixdoc
7174
func (l *BuilderLogger) Warn(msg string) {
75+
if msg == "" {
76+
return
77+
}
7278
l.stdLock.Lock()
7379
defer l.stdLock.Unlock()
7480
fmt.Fprintln(l.stderr, msg)

0 commit comments

Comments
 (0)