]> Dogcows Code - chaz/git-codeowners/commitdiff
log if env var GIT_CODEOWNERS_DEBUG is set
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 13 Nov 2019 04:09:23 +0000 (21:09 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 13 Nov 2019 04:09:23 +0000 (21:09 -0700)
lib/App/Codeowners/Util.pm

index d7a4a4b450ccce470124c41224748c68d967f8e4..ac613f1dcb24e1db226d7ed98002aa7de4237c3c 100644 (file)
@@ -89,6 +89,8 @@ sub run_command {
     my $filter;
     $filter = pop if ref($_[-1]) eq 'CODE';
 
+    print STDERR "# @_\n" if $ENV{GIT_CODEOWNERS_DEBUG};
+
     my ($child_in, $child_out);
     require IPC::Open2;
     my $pid = IPC::Open2::open2($child_out, $child_in, @_);
@@ -283,6 +285,7 @@ sub unbackslash {
         }
         waitpid($pid, 0);
         my $status = $?;
+        print STDERR "# -> status $status\n" if $ENV{GIT_CODEOWNERS_DEBUG};
         delete $self->{pid};
         return $status;
     }
This page took 0.020011 seconds and 4 git commands to generate.