Skip to content

Commit

Permalink
Skip DebugKit on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
garas authored Jan 1, 2020
1 parent c2b18c9 commit 38ff351
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ class Plugin extends BasePlugin
public function bootstrap(PluginApplicationInterface $app): void
{
$service = new ToolbarService(EventManager::instance(), (array)Configure::read('DebugKit'));
$this->service = $service;

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

$this->service = $service;

$this->setDeprecationHandler($service);

// will load `config/bootstrap.php`.
Expand Down

0 comments on commit 38ff351

Please sign in to comment.