diff --git a/pkgs/misc/tex/nix/find-includes.pl b/pkgs/misc/tex/nix/find-includes.pl index e4424a3ecd6..649b16dc35f 100644 --- a/pkgs/misc/tex/nix/find-includes.pl +++ b/pkgs/misc/tex/nix/find-includes.pl @@ -28,6 +28,11 @@ while (scalar @workset > 0) { $doneset{$fn} = 1; + if (!-e "$fn") { + print STDERR "cannot access `$fn': $!\n" if !$!{ENOENT}; + next; + } + next unless -e "$fn";