Skip to content

Commit

Permalink
Fixed usage of NOMAD_CLI_NO_COLOR env variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo13 committed Sep 10, 2021
1 parent d87324d commit f25a597
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion command/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ func (m *Meta) allNamespaces() bool {
}

func (m *Meta) Colorize() *colorstring.Colorize {
noColor := m.noColor || os.Getenv(EnvNomadCLINoColor) != ""

return &colorstring.Colorize{
Colors: colorstring.DefaultColors,
Disable: m.noColor || !terminal.IsTerminal(int(os.Stdout.Fd())),
Disable: noColor || !terminal.IsTerminal(int(os.Stdout.Fd())),
Reset: true,
}
}
Expand Down

0 comments on commit f25a597

Please sign in to comment.