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"
This commit is contained in:
KWSys Upstream
2021-05-06 11:48:52 -04:00
committed by Brad King
parent 04c6e736f6
commit 760bdfb26e

View File

@@ -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;
}
}