Commit 5c8ebef9 authored by Matt Joiner's avatar Matt Joiner Committed by GitHub

Don't recheck terminal type for color (#11412)

Not necessary as it's checked further up the call tree. Without this --log.color doesn't work when intended.
parent 5a4fbce2
...@@ -140,7 +140,7 @@ func FormatHandler(ft FormatType, color bool) func(io.Writer) slog.Handler { ...@@ -140,7 +140,7 @@ func FormatHandler(ft FormatType, color bool) func(io.Writer) slog.Handler {
case FormatJSON: case FormatJSON:
return log.JSONHandler return log.JSONHandler
case FormatText: case FormatText:
if term.IsTerminal(int(os.Stdout.Fd())) { if color {
return termColorHandler return termColorHandler
} else { } else {
return logfmtHandler return logfmtHandler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment