Skip to content

Commit

Permalink
checking if the name of file that does exists
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Oct 10, 2024
1 parent f31bc27 commit ccf020a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/Zarn/Helper/Files.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ package Zarn::Helper::Files {

my @files = $rule -> in($source);

if (!@files) {
print "[!] Could not identify any files in: $source.\n";
return 1;
}

return @files;
}

Expand Down
2 changes: 1 addition & 1 deletion zarn.pl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ sub main {
}

my @rules = Zarn::Helper::Rules->new($rules);
my @files = Zarn::Helper::Files->new( $source, $ignore );
my @files = Zarn::Helper::Files->new($source, $ignore);

foreach my $file (@files) {
if (@rules) {
Expand Down

0 comments on commit ccf020a

Please sign in to comment.