Skip to content

Commit 0407740

Browse files
committed
fix: improve theme resolution and output formatting in build command
1 parent 35055bb commit 0407740

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/Console/Command/AbstractCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,10 @@ private function removeSecureEnvironmentValue(string $name): void
486486
* @param \OpenForgeProject\MageForge\Model\ThemeList $themeList
487487
* @return string[]
488488
*/
489-
protected function resolveWildcardThemes(array $themeCodes, \OpenForgeProject\MageForge\Model\ThemeList $themeList): array
490-
{
489+
protected function resolveWildcardThemes(
490+
array $themeCodes,
491+
\OpenForgeProject\MageForge\Model\ThemeList $themeList
492+
): array {
491493
$resolved = [];
492494
$availableThemes = null;
493495

@@ -519,7 +521,7 @@ protected function resolveWildcardThemes(array $themeCodes, \OpenForgeProject\Ma
519521
));
520522
}
521523

522-
$resolved = array_merge($resolved, $matched);
524+
array_push($resolved, ...$matched);
523525
} else {
524526
$resolved[] = $code;
525527
}

src/Console/Command/Theme/BuildCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,17 @@ private function displayBuildSummary(SymfonyStyle $io, array $successList, float
353353

354354
if ($successCount > 0) {
355355
$io->success(sprintf(
356-
'🚀 Successfully built %d theme(s). Build process completed in %.2f seconds.',
357-
$successCount,
356+
'🚀 Successfully built %d theme(s). Build process completed in %.2f seconds.',
357+
$successCount,
358358
$duration
359359
));
360360
$io->writeln('Summary:');
361361
$io->newLine();
362362
} else {
363-
$io->warning(sprintf('Build process completed in %.2f seconds, but no themes were built successfully.', $duration));
363+
$io->warning(sprintf(
364+
'Build process completed in %.2f seconds, but no themes were built successfully.',
365+
$duration
366+
));
364367
return;
365368
}
366369

0 commit comments

Comments
 (0)