Skip to content

Commit 540c390

Browse files
committed
🧑‍💻 Use OptimizeCommand::getOptimizedTasks when getting optimize tasks
1 parent e517a1a commit 540c390

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Roots/Acorn/Console/Commands/OptimizeCommand.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ public function handle()
1818
{
1919
$this->components->info('Caching framework bootstrap, configuration, and metadata.');
2020

21-
collect([
22-
'config' => fn () => $this->gracefulCallSilent('config:cache') == 0,
23-
'events' => fn () => $this->gracefulCallSilent('event:cache') == 0,
24-
'routes' => fn () => $this->gracefulCallSilent('route:cache') == 0,
25-
'views' => fn () => $this->gracefulCallSilent('view:cache') == 0,
26-
])->each(fn ($task, $description) => $this->components->task($description, $task));
21+
foreach ($this->getOptimizeTasks() as $description => $command) {
22+
$this->components->task($description, fn () => $this->gracefulCallSilent($command) == 0);
23+
}
2724

2825
$this->newLine();
2926
}

0 commit comments

Comments
 (0)