diff --git a/lib/output/capabilities.go b/lib/output/capabilities.go index c944947d3072..52ed50372f55 100644 --- a/lib/output/capabilities.go +++ b/lib/output/capabilities.go @@ -30,6 +30,13 @@ type capabilities struct { // that if an override is indicated in opts, no inference of the relevant capabilities // is done at all. func detectCapabilities(opts OutputOpts) (caps capabilities, err error) { + // Workaround: For some reason the dark background detection hangs indefinitely in + // Buildkite, so ForceDarkBackground being set is a required (Buildkite output is + // always against a dark background anyway, so for the user this should be fine) + if os.Getenv("BUILDKITE") == "true" { + opts.ForceDarkBackground = true + } + // Set atty caps.Isatty = opts.ForceTTY if !opts.ForceTTY { diff --git a/lib/output/output.go b/lib/output/output.go index 218484a9aef7..75143acf6a5e 100644 --- a/lib/output/output.go +++ b/lib/output/output.go @@ -69,6 +69,10 @@ type OutputOpts struct { // ForceDarkBackground ignores all terminal detection and sets whether the terminal // background is dark to this value. + // + // Workaround: For some reason the dark background detection hangs indefinitely in + // Buildkite, so ForceDarkBackground being set is a required (Buildkite output is + // always against a dark background anyway, so for the user this should be fine) ForceDarkBackground bool Verbose bool