From 760bdfb26ee94569287991d12e988573ab260177 Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Thu, 6 May 2021 11:48:52 -0400 Subject: KWSys 2021-05-06 (2fa93cfc) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 2fa93cfca6291e8eaffa2a34d2d7908c93e64a6c (master). Upstream Shortlog ----------------- Brad King (1): 5c6539ca Terminal: Revert "Simplify CLICOLOR_FORCE check" --- Terminal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Terminal.c b/Terminal.c index 57a68bf..20bb5fe 100644 --- a/Terminal.c +++ b/Terminal.c @@ -167,7 +167,8 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, /* Force color according to http://bixense.com/clicolors/ convention. */ { const char* clicolor_force = getenv("CLICOLOR_FORCE"); - if (clicolor_force && strcmp(clicolor_force, "0") != 0) { + if (clicolor_force && *clicolor_force && + strcmp(clicolor_force, "0") != 0) { return 1; } } -- cgit v0.12