Skip to content

Commit ba60746

Browse files
committed
Fixed usage of NOMAD_CLI_NO_COLOR env variable.
1 parent d87324d commit ba60746

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

command/meta.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,11 @@ func (m *Meta) allNamespaces() bool {
154154
}
155155

156156
func (m *Meta) Colorize() *colorstring.Colorize {
157+
noColor := m.noColor || os.Getenv(EnvNomadCLINoColor) != ""
158+
157159
return &colorstring.Colorize{
158160
Colors: colorstring.DefaultColors,
159-
Disable: m.noColor || !terminal.IsTerminal(int(os.Stdout.Fd())),
161+
Disable: noColor || !terminal.IsTerminal(int(os.Stdout.Fd())),
160162
Reset: true,
161163
}
162164
}

0 commit comments

Comments
 (0)