Skip to content

Commit a22bc17

Browse files
committed
Filter the files to only include the selected ones
1 parent b56024c commit a22bc17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/framework/src/Console/Commands/PublishViewsCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ protected function handleInteractivePublish(): void
137137
$selectedFiles = $this->promptForFiles($files, basename($target));
138138

139139
$this->infoComment(sprintf("Selected files [%s]\n", collect($selectedFiles)->map(fn (string $file): string => Str::after($file, basename($source).'/'))->implode(', ')));
140+
141+
// Now we filter the files to only include the selected ones
142+
$selectedFiles = $files->filter(fn (string $file): bool => in_array($file, $selectedFiles));
140143
}
141144

142145
protected function promptForFiles(Collection $files, string $baseDir): array

0 commit comments

Comments
 (0)