Skip to content

Commit 5c8ebef

Browse files
authored
Don't recheck terminal type for color (ethereum-optimism#11412)
Not necessary as it's checked further up the call tree. Without this --log.color doesn't work when intended.
1 parent 5a4fbce commit 5c8ebef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

op-service/log/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func FormatHandler(ft FormatType, color bool) func(io.Writer) slog.Handler {
140140
case FormatJSON:
141141
return log.JSONHandler
142142
case FormatText:
143-
if term.IsTerminal(int(os.Stdout.Fd())) {
143+
if color {
144144
return termColorHandler
145145
} else {
146146
return logfmtHandler

0 commit comments

Comments
 (0)