X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FApp%2FCodeowners.pm;fp=lib%2FApp%2FCodeowners.pm;h=291660a5609496aaaaf3014e5791b328adca72bd;hb=8449a6dac8b4adf0e20bceecbff921d6dc598701;hp=e70a109cf57ba499517201d4f949663407c555b8;hpb=3a345750fddc777385eacb334ea011f9327b774e;p=chaz%2Fgit-codeowners diff --git a/lib/App/Codeowners.pm b/lib/App/Codeowners.pm index e70a109..291660a 100644 --- a/lib/App/Codeowners.pm +++ b/lib/App/Codeowners.pm @@ -14,7 +14,7 @@ use Encode qw(encode); use File::Codeowners; use Path::Tiny; -our $VERSION = '0.42'; # VERSION +our $VERSION = '0.43'; # VERSION sub main { @@ -194,11 +194,10 @@ END if ($repopath) { # if there is a repo we can try to update the list of unowned files - my $git_files = git_ls_files($repopath); - if (@$git_files) { - $codeowners->clear_unowned; - $codeowners->add_unowned(grep { !$codeowners->match($_) } @$git_files); - } + my ($proc, @filepaths) = git_ls_files($repopath); + $proc->wait and exit 1; + $codeowners->clear_unowned; + $codeowners->add_unowned(grep { !$codeowners->match($_) } @filepaths); } $codeowners->write_to_filepath($path); @@ -219,7 +218,7 @@ App::Codeowners - A tool for managing CODEOWNERS files =head1 VERSION -version 0.42 +version 0.43 =head1 METHODS