diff options
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/stdlib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index 569970c2..b4a1ad77 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -43,6 +43,8 @@ public void tomo_init(void) { GC_INIT(); USE_COLOR = getenv("COLOR") ? strcmp(getenv("COLOR"), "1") == 0 : isatty(STDOUT_FILENO); + if (getenv("NO_COLOR") && getenv("NO_COLOR")[0] != '\0') + USE_COLOR = false; getrandom(TOMO_HASH_KEY, sizeof(TOMO_HASH_KEY), 0); int rng_fd = open("/dev/urandom", O_RDONLY); |
