From b04ef3d005c558adcf51665fbbe421198aca7315 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Tue, 12 Nov 2019 21:09:23 -0700 Subject: [PATCH] log if env var GIT_CODEOWNERS_DEBUG is set --- lib/App/Codeowners/Util.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/App/Codeowners/Util.pm b/lib/App/Codeowners/Util.pm index d7a4a4b..ac613f1 100644 --- a/lib/App/Codeowners/Util.pm +++ b/lib/App/Codeowners/Util.pm @@ -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; } -- 2.45.2