Skip to content

Commit 8e5a5d5

Browse files
committed
prevent duplicate exclude/include entries
1 parent 738f1e5 commit 8e5a5d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Builder/Concerns/CopiesToBuildDirectory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public function copyToBuildDirectory(): bool
2828

2929
$filesystem = new Filesystem;
3030

31-
$patterns = array_merge(
31+
$patterns = array_unique(array_merge(
3232
config('nativephp-internal.cleanup_exclude_files', []),
3333
config('nativephp.cleanup_exclude_files', []),
34-
);
34+
));
3535

3636
// Clean and create build directory
3737
$filesystem->remove($buildPath);
@@ -115,10 +115,10 @@ private function copyIncludedFiles(): void
115115
$buildPath = $this->buildPath('app');
116116
$filesystem = new Filesystem;
117117

118-
$patterns = array_merge(
118+
$patterns = array_unique(array_merge(
119119
config('nativephp-internal.cleanup_include_files', []),
120120
config('nativephp.cleanup_include_files', []),
121-
);
121+
));
122122

123123
foreach ($patterns as $pattern) {
124124
$matchingFiles = glob($sourcePath . '/' . $pattern, GLOB_BRACE);

0 commit comments

Comments
 (0)