Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit e4e0905

Browse files
committed
Eliminate errors for directories that don't exist
If one of the reported search paths doesn't exist, don't call `find` to search it.
1 parent a9a7297 commit e4e0905

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/clr-check-perl-modules.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
my %results;
4444
# Scan longest stems first
4545
my @basedirs = sort { length($b) <=> length($a) } keys %patterns;
46+
BASEDIR:
4647
foreach my $basedir (@basedirs) {
48+
# Skip ahead if this directory doesn't exist
49+
next BASEDIR unless -d $basedir;
4750
foreach my $pattern (sort { length($b) <=> length($a) }
4851
keys %{$patterns{$basedir}}) {
4952
open(my $fh, "-|", "find ${basedir} -type d")

0 commit comments

Comments
 (0)