Skip to content

Commit

Permalink
cli: fix crash when running commands
Browse files Browse the repository at this point in the history
The commands are cached in cache store and not in session object.

Fixes Leantime#2710
  • Loading branch information
gramakri committed Oct 18, 2024
1 parent 0c44064 commit 4634603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Core/Console/ConsoleKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function commands()
array_map(fn ($plugin) => $plugin->foldername, $this->getApplication()->make(PluginsService::class)->getAllPlugins(enabledOnly: true)),
)));

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

/**
Expand Down

0 comments on commit 4634603

Please sign in to comment.