Skip to content

Commit 3156a67

Browse files
committed
Make tools/build/gen-version.pl work correctly in git submodules.
1 parent aa41dd3 commit 3156a67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/build/gen-version.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ =head1 TITLE
1212
my $VERSION = <$fh>;
1313
close($fh);
1414

15-
if (-d '.git' && open(my $GIT, '-|', "git describe --tags")) {
15+
# .git is a file and not a directory in submodule
16+
if (-e '.git' && open(my $GIT, '-|', "git describe --tags")) {
1617
$VERSION = <$GIT>;
1718
close($GIT);
1819
}

0 commit comments

Comments
 (0)