X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FTest%2FFile%2FCodeowners.pm;h=a166e71f21f7be9f58059f50aa80e978b9b73a04;hb=3a345750fddc777385eacb334ea011f9327b774e;hp=44a384f9fb777505f20fd30e573b14fb014abb7f;hpb=0047d0a57e8ffe0d7cfde415fa6f50dae30201d1;p=chaz%2Fgit-codeowners diff --git a/lib/Test/File/Codeowners.pm b/lib/Test/File/Codeowners.pm index 44a384f..a166e71 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.42'; # 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.42 =head1 SYNOPSIS