X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgit-codeowners;a=blobdiff_plain;f=lib%2FApp%2FCodeowners%2FFormatter%2FString.pm;fp=lib%2FApp%2FCodeowners%2FFormatter%2FString.pm;h=ecc0808c9b53c615d3d6a5e44d54bdb77f346183;hp=6421783e5490501c784a77388c026e702080f218;hb=6428b239d2454b5272c52cc1bb9ca1eadfc7cdd9;hpb=9ee7195d654de8e00aead3550e17d7bc1a65c7ce diff --git a/lib/App/Codeowners/Formatter/String.pm b/lib/App/Codeowners/Formatter/String.pm index 6421783..ecc0808 100644 --- a/lib/App/Codeowners/Formatter/String.pm +++ b/lib/App/Codeowners/Formatter/String.pm @@ -61,7 +61,7 @@ sub _colored { my $text = shift; my $rgb = shift or return $text; - return $text if $ENV{NO_COLOR}; + return $text if $ENV{NO_COLOR} || (defined $ENV{COLOR_DEPTH} && !$ENV{COLOR_DEPTH}); $rgb =~ s/^(.)(.)(.)$/$1$1$2$2$3$3/; if ($rgb !~ m/^[0-9a-fA-F]{6}$/) {