Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Dec 19, 2024
2 parents 0490263 + ba732f7 commit 919bb46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/Console/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Support\Collection;
use Orchestra\Workbench\BuildParser;
use Orchestra\Workbench\Contracts\RecipeManager;
use Orchestra\Workbench\Recipes\Command as CommandRecipe;
use Orchestra\Workbench\Workbench;
use Symfony\Component\Console\Attribute\AsCommand;

Expand Down Expand Up @@ -37,7 +38,11 @@ public function handle(ConsoleKernel $kernel, RecipeManager $recipes)
->each(function (array $options, string $name) use ($kernel, $recipes, $commands) {
/** @var array<string, mixed> $options */
if ($recipes->hasCommand($name)) {
$recipes->command($name)->handle($kernel, $this->output);
tap($recipes->command($name), function ($recipe) use ($options) {
if ($recipe instanceof CommandRecipe) {
$recipe->options = $options;
}
})->handle($kernel, $this->output);

return;
}
Expand Down
9 changes: 4 additions & 5 deletions src/Recipes/AssetPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class AssetPublishCommand extends Command
*/
public function __construct()
{
parent::__construct('vendor:publish', [
'--force' => true,
]);
parent::__construct('vendor:publish', []);
}

/**
Expand All @@ -32,8 +30,9 @@ protected function commandOptions(): array
->unique()
->all();

return array_merge([
return array_merge($this->options, [
'--tag' => $tags,
], $this->options);
'--force' => true,
]);
}
}

0 comments on commit 919bb46

Please sign in to comment.