X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgit-codeowners;a=blobdiff_plain;f=lib%2FTest%2FFile%2FCodeowners.pm;h=332b3b7eed3b361540f5dcdaf190bb50d754e1b6;hp=8bdf14bb84237e5ea6680b955649b0d6290bc673;hb=26eed33eb4aa577d9347e5ebaf577b3e3a2c0396;hpb=f5bbfcbc345874483160d1cf8fb52871ab6a7d85 diff --git a/lib/Test/File/Codeowners.pm b/lib/Test/File/Codeowners.pm index 8bdf14b..332b3b7 100644 --- a/lib/Test/File/Codeowners.pm +++ b/lib/Test/File/Codeowners.pm @@ -78,11 +78,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);