Skip to content

Commit

Permalink
Add no-color compatibility (#1646)
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Dec 7, 2021
1 parent a5b2b89 commit f74dd88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Expand Up @@ -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)
}

Expand Down

0 comments on commit f74dd88

Please sign in to comment.