Skip to content

Commit 38ff351

Browse files
authored
Skip DebugKit on CLI
1 parent c2b18c9 commit 38ff351

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Plugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ class Plugin extends BasePlugin
4242
public function bootstrap(PluginApplicationInterface $app): void
4343
{
4444
$service = new ToolbarService(EventManager::instance(), (array)Configure::read('DebugKit'));
45-
$this->service = $service;
4645

4746
if (!$service->isEnabled() || php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg') {
4847
return;
4948
}
5049

50+
$this->service = $service;
51+
5152
$this->setDeprecationHandler($service);
5253

5354
// will load `config/bootstrap.php`.

0 commit comments

Comments
 (0)