Skip to content

Commit f2c1d23

Browse files
committed
Fixup _parse_ignore_files for tests
1 parent 2b94fb6 commit f2c1d23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/GrepCpan/Grep.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,10 @@ sub _load_cache ( $self, $cache_file ) {
577577
# t/*, *.md, *.json, *.yaml, *.yml, *.conf, cpanfile, LICENSE, MANIFEST, INSTALL, Changes, Makefile.PL, Build.PL, Copying, *.SKIP, *.ini, README
578578
sub _parse_ignore_files ( $self, $ignore_files ) {
579579

580-
my @ignorelist = grep {m{^ [a-zA-Z0-9_\-\.\*/]+ $}x}
581-
grep { length $_ } split( /\s*,\s*/, $ignore_files );
580+
return unless length $ignore_files;
581+
582+
my @ignorelist = grep { length($_) && m{^ [a-zA-Z0-9_\-\.\*/]+ $}x }
583+
split( /\s*,\s*/, $ignore_files );
582584

583585
# ignore rules using '..'
584586
return if grep {m{\.\.}} @ignorelist;

0 commit comments

Comments
 (0)