diff --git a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php index 343786c10b18..0ee659a25055 100644 --- a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php +++ b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php @@ -274,7 +274,7 @@ public function withCommands(array $commands = []) protected function withCommandRouting(array $paths) { $this->app->afterResolving(ConsoleKernel::class, function ($kernel) use ($paths) { - $kernel->setCommandRoutePaths($paths); + $this->app->booted(fn () => $kernel->addCommandRoutePaths($paths)); }); }