]> Dogcows Code - chaz/git-codeowners/blobdiff - lib/Test/File/Codeowners.pm
Version 0.42
[chaz/git-codeowners] / lib / Test / File / Codeowners.pm
index 44a384f9fb777505f20fd30e573b14fb014abb7f..a166e71f21f7be9f58059f50aa80e978b9b73a04 100644 (file)
@@ -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
 
This page took 0.02739 seconds and 4 git commands to generate.