cmd/mbf: enable output colouring
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 3m36s
Test / Hakurei (push) Successful in 6m11s
Test / Sandbox (race detector) (push) Successful in 7m44s
Test / Hakurei (race detector) (push) Successful in 9m57s
Test / ShareFS (push) Successful in 10m35s
Test / Flake checks (push) Successful in 1m30s
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 3m36s
Test / Hakurei (push) Successful in 6m11s
Test / Sandbox (race detector) (push) Successful in 7m44s
Test / Hakurei (race detector) (push) Successful in 9m57s
Test / ShareFS (push) Successful in 10m35s
Test / Flake checks (push) Successful in 1m30s
This respects the de facto standards, on top of checking stderr. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -92,6 +92,11 @@ func main() {
|
||||
|
||||
var cm cache
|
||||
defer func() { cm.Close() }()
|
||||
if cm.color = ext.Isatty(syscall.Stderr) &&
|
||||
os.Getenv("NO_COLOR") == "" &&
|
||||
os.Getenv("TERM") != "dumb"; cm.color {
|
||||
log.SetPrefix("\x1b[2mmbf: \x1b[0m")
|
||||
}
|
||||
|
||||
var (
|
||||
flagQuiet bool
|
||||
|
||||
Reference in New Issue
Block a user