File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Added
11+
12+ - Unconditionally enable colors if the [ FORCE_COLOR] ( https://force-color.org ) environment variable is set to a non-empty value.
13+
1014## [ 3.28.0] - 2026-01-14
1115
1216### Added
Original file line number Diff line number Diff line change @@ -36,11 +36,10 @@ func BuildRootCmd(conf *config.Config) cobra.Command {
3636 return err
3737 }
3838
39- // detect desired colour output
39+ // detect desired colour output, respect https://force-color.org (FORCE_COLOR, NO_COLOR)
4040 switch {
41- case conf .GlobalFlags .ForceColours == config .True :
41+ case conf .GlobalFlags .ForceColours == config .True || os . Getenv ( "FORCE_COLOR" ) != "" :
4242 text .EnableColors ()
43- // Environment variable with US spelling to support https://no-color.org
4443 case conf .GlobalFlags .NoColours == config .True || os .Getenv ("NO_COLOR" ) != "" :
4544 text .DisableColors ()
4645 case conf .GlobalFlags .OutputFormat != config .ValueOutputHuman :
You can’t perform that action at this time.
0 commit comments