Skip to content

Commit 601c1ce

Browse files
authored
Fix $path argument type mismatch when checking for excludes
1 parent 246701f commit 601c1ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/FileSelection.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected function yieldSelectedFiles()
121121
$finder->in($this->includedDirectories());
122122

123123
foreach ($finder->getIterator() as $file) {
124-
if ($this->shouldExclude($file)) {
124+
if ($this->shouldExclude($file->getRealPath())) {
125125
continue;
126126
}
127127

@@ -160,7 +160,7 @@ protected function includedDirectories()
160160
protected function shouldExclude(string $path): bool
161161
{
162162
foreach ($this->excludeFilesAndDirectories as $excludedPath) {
163-
if (Str::startsWith(realpath($path), $excludedPath)) {
163+
if (Str::startsWith($path, $excludedPath)) {
164164
return true;
165165
}
166166
}

0 commit comments

Comments
 (0)