X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FTest%2FFile%2FCodeowners.pm;h=131421b0d32d08e1cc083d36ac582d8327489bfd;hb=a6b5af4adc7ded62e680b82073781028c2e78158;hp=44a384f9fb777505f20fd30e573b14fb014abb7f;hpb=0047d0a57e8ffe0d7cfde415fa6f50dae30201d1;p=chaz%2Fgit-codeowners diff --git a/lib/Test/File/Codeowners.pm b/lib/Test/File/Codeowners.pm index 44a384f..131421b 100644 --- a/lib/Test/File/Codeowners.pm +++ b/lib/Test/File/Codeowners.pm @@ -10,7 +10,7 @@ use Encode qw(encode); use File::Codeowners; use Test::Builder; -our $VERSION = '0.41'; # VERSION +our $VERSION = '0.45'; # VERSION my $Test = Test::Builder->new; @@ -49,11 +49,11 @@ sub codeowners_git_files_ok { return; } - my $files = git_ls_files(git_toplevel()); + my ($proc, @files) = git_ls_files(git_toplevel()); - $Test->plan(@$files ? (tests => scalar @$files) : (skip_all => 'git ls-files failed')); + $Test->plan($proc->wait == 0 ? (tests => scalar @files) : (skip_all => 'git ls-files failed')); - for my $filepath (@$files) { + for my $filepath (@files) { my $msg = encode('UTF-8', "Check file: $filepath"); my $match = $codeowners->match($filepath); @@ -88,7 +88,7 @@ Test::File::Codeowners - Write tests for CODEOWNERS files =head1 VERSION -version 0.41 +version 0.45 =head1 SYNOPSIS