From: Charles McGarvey Date: Wed, 13 Nov 2019 04:09:23 +0000 (-0700) Subject: log if env var GIT_CODEOWNERS_DEBUG is set X-Git-Tag: v0.42~3 X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgit-codeowners;a=commitdiff_plain;h=b04ef3d005c558adcf51665fbbe421198aca7315 log if env var GIT_CODEOWNERS_DEBUG is set --- 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; }