]> Dogcows Code - chaz/git-codeowners/blobdiff - lib/Test/File/Codeowners.pm
refactor formatters
[chaz/git-codeowners] / lib / Test / File / Codeowners.pm
index 8bdf14bb84237e5ea6680b955649b0d6290bc673..332b3b7eed3b361540f5dcdaf190bb50d754e1b6 100644 (file)
@@ -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);
This page took 0.019329 seconds and 4 git commands to generate.