mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-14 16:20:34 +00:00
Add no-color compatibility (#1646)
This commit is contained in:
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()
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user