Skip to content

Commit

Permalink
Tracy is only possible dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Mar 13, 2022
1 parent 3176e09 commit 2bb5768
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/PackageRegistrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(?string $rootDir = null, ?string $tempDir = null)
$tempDir = (new TempDirResolver($rootDirResolver))->get();
}
}
if (Debugger::$logDirectory === null) {
if (class_exists(Debugger::class) === true && Debugger::$logDirectory === null) {
FileSystem::createDir($rootDir . '/log');
try {
Debugger::enable(false, $rootDir . '/log');
Expand All @@ -76,7 +76,9 @@ public function __construct(?string $rootDir = null, ?string $tempDir = null)
try {
self::$packageDescriptorEntity = $storage->load();
} catch (PackageDescriptorException $e) {
Debugger::log($e, 'critical');
if (class_exists(Debugger::class) === true) {
Debugger::log($e, 'critical');
}
if (PHP_SAPI === 'cli') {
ConsoleHelpers::terminalRenderError($e->getMessage());
} else {
Expand Down

0 comments on commit 2bb5768

Please sign in to comment.