Skip to content

Commit 4634603

Browse files
committed
cli: fix crash when running commands
The commands are cached in cache store and not in session object. Fixes #2710
1 parent 0c44064 commit 4634603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Core/Console/ConsoleKernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected function commands()
151151
array_map(fn ($plugin) => $plugin->foldername, $this->getApplication()->make(PluginsService::class)->getAllPlugins(enabledOnly: true)),
152152
)));
153153

154-
$commands = collect(Arr::flatten(session("commands")))
154+
$commands = collect(Arr::flatten(Cache::store('installation')->many(["commands.core", "commands.plugins"])))
155155
->map(fn ($path) => $this->getApplication()->getNamespace() . Str::of($path)->remove([APP_ROOT . '/app/', APP_ROOT . '/custom/'])->replace(['/', '.php'], ['\\', ''])->toString());
156156

157157
/**

0 commit comments

Comments
 (0)