Skip to content

Commit c27078e

Browse files
committed
Fix git command in build script when building Manifest
Run `git ls-files` only in .git directory and submodules.
1 parent 4e7b259 commit c27078e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile.PL

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ if (-d ".git" && !$skip_git)
230230
{
231231
my $cwd = Cwd::getcwd;
232232
chdir ($module) or die "pushd: $!";
233-
my $files = `git ls-files` or die "Couldn't run git: $!";
233+
my $files = "";
234+
if (-e ".git") {
235+
$files = `git ls-files` or
236+
die "Couldn't run git: $!";
237+
}
234238
my @items = split(/\n+/, $files);
235239
my @files = grep { ! -d } @items;
236240
print $manifest grep { ! /\"/ }

0 commit comments

Comments
 (0)