diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-07-30 06:01:54 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-07-30 06:01:54 +0900 |
| commit | 4dbfee06989c35c9c7204aacd1dc28340c4de72a (patch) | |
| tree | b8b511b5fdee3a753581aa1f30dcd2016ea402a3 /internal | |
| parent | 4e65e41101efbea1b6f3f4eb23ad5b1717283855 (diff) | |
internal/rosa: force output colouring
This sets known de facto standard environment variables to enable colours during builds.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/rosa/make.go | 1 | ||||
| -rw-r--r-- | internal/rosa/rosa.go | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go index 8b1103d6..710225a2 100644 --- a/internal/rosa/make.go +++ b/internal/rosa/make.go @@ -173,6 +173,7 @@ make \ scriptMake += attr.ScriptCheckEarly + `make \ ` + jobsFlagE + ` \ ` + loadFlagE + ` \ + AM_COLOR_TESTS=always \ ` if len(attr.Check) > 0 { scriptMake += strings.Join(attr.Check, " \\\n\t") diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index 8287795d..f5a67a98 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -322,6 +322,8 @@ type PackageAttr struct { // Hint for an early variant of toybox to be used when available. Early bool + // Whether to omit output colour environment variables. + NoColor bool // Exclude the LLVM toolchain. NoToolchain bool // Whether the resulting [pkg.Artifact] is exclusive. @@ -399,6 +401,12 @@ func (t Toolchain) New( const lcMessages = "LC_MESSAGES=C.UTF-8" srn := rn env := slices.Clone(attr.Env) + if !attr.NoColor { + env = append(env, + "CLICOLOR_FORCE=1", + "FORCE_COLOR=1", + ) + } var extraBoot []ArtifactH switch t.stage { |
