]> Dogcows Code - chaz/git-codeowners/commitdiff
also honor COLOR_DEPTH environment variable
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Fri, 15 Nov 2019 04:29:03 +0000 (21:29 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Fri, 15 Nov 2019 04:29:03 +0000 (21:29 -0700)
lib/App/Codeowners/Formatter/String.pm

index 6421783e5490501c784a77388c026e702080f218..ecc0808c9b53c615d3d6a5e44d54bdb77f346183 100644 (file)
@@ -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}$/) {
This page took 0.022468 seconds and 4 git commands to generate.