From 010be2b6d4b1ec865a686345116deb92570636e2 Mon Sep 17 00:00:00 2001
From: "Phil.Beadling" <phil@beadling.co.uk>
Date: Wed, 16 Feb 2022 17:40:32 +0000
Subject: [PATCH] allow user to force color when not a tty
---
guix/colors.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -131,8 +131,9 @@ that subsequent output will not have any colors in effect."
(define (color-output? port)
"Return true if we should write colored output to PORT."
- (and (not (getenv "NO_COLOR"))
- (isatty?* port)))
+ (or (getenv "GUIX_COLOR_OUTPUT")
+ (and (not (getenv "NO_COLOR"))
+ (isatty?* port))))
(define (coloring-procedure color)
"Return a procedure that applies COLOR to the given string."
--
2.25.1