Skip to content

Commit f29bc14

Browse files
committed
skip testing .github/README.md if doesn't appear to be a README
git on windows at least of 2.37.1 does not checkout symbolic links as symbolic links, leaving them as files containing the filename linked to. This meant this test against .github/README.md failed, since it only contained "../README": nothing that appears to be a copyright message I considered testing that .github/README.md was a symbolic link but 8975221 suggests that it may eventually become more distinct from the root README file, so instead check its size.
1 parent d7c0b58 commit f29bc14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/porting/copyright.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ my ($opt) = @ARGV;
3131
my $readme_year = readme_year();
3232
my $v_year = v_year();
3333
my $gh_readme_year;
34-
if (-e "../.github/README.md")
34+
# git on windows renders symbolic links as a file containing
35+
# the file linked to
36+
if (-e "../.github/README.md" && -s "../.github/README.md" > 80)
3537
{
3638
$gh_readme_year = readme_year(".github/README.md");
3739
}

0 commit comments

Comments
 (0)