mirror of https://github.com/gofiber/fiber.git
Add no-color compatibility (#1646)
parent
a5b2b8989b
commit
f74dd882ea
2
app.go
2
app.go
|
@ -1155,7 +1155,7 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
out := colorable.NewColorableStdout()
|
out := colorable.NewColorableStdout()
|
||||||
if os.Getenv("TERM") == "dumb" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) {
|
if os.Getenv("TERM") == "dumb" || os.Getenv("NO_COLOR") == "1" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) {
|
||||||
out = colorable.NewNonColorable(os.Stdout)
|
out = colorable.NewNonColorable(os.Stdout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue