Skip to content
Commit b3718bc4 authored by Med Ismail Bennani's avatar Med Ismail Bennani
Browse files

[llvm/Support] Fallback to $TERM if terminfo has no "colors" capability

It can happen on macOS that terminal doesn't report the "colors"
capability in the terminfo database, in which case `tigetnum` returns -1.

This doesn't mean however that the terminal doesn't supports color, it
just means that the capability is absent from the terminal description.

In that case, we should still fallback to the checking the $TERM
environment variable to see if it supports ANSI escapes codes.

Differential Revision: https://reviews.llvm.org/D125914



Signed-off-by: default avatarMed Ismail Bennani <medismail.bennani@gmail.com>
parent a5d618b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment