Skip to content

Commit 67cf5f7

Browse files
committed
jlogs: allow env var 'colors' to force colors on
1 parent 2bd603d commit 67cf5f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jlogs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class nocolors:
1616
def __getattr__(self, k):
1717
return ''
1818

19-
C = colors() if os.isatty(1) else nocolors()
19+
C = colors() if os.isatty(1) or os.getenv('colors') else nocolors()
2020
col = lambda s, *cs: '' if not s else ''.join(cs) + s + C.end
2121

2222
short = bool(os.getenv('short'))

0 commit comments

Comments
 (0)