Skip to content
Snippets Groups Projects
Commit 5c6539ca authored by Brad King's avatar Brad King
Browse files

Terminal: Revert "Simplify CLICOLOR_FORCE check"

Revert commit bbf6cdef (Terminal: Simplify CLICOLOR_FORCE check,
2021-05-03).  If `CLICOLOR_FORCE` is set to an empty string, it
will compare `!= "0"` but we still do not want to force color on.
parent e9ca4104
No related branches found
No related tags found
No related merge requests found
Pipeline #227454 passed
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment