Disable debug mode if dev dependencies are not installed

This commit is contained in:
Pierre Rudloff 2020-06-20 14:14:38 +02:00
parent 359615d0ed
commit 672a1a9754

View file

@ -8,6 +8,7 @@ namespace Alltube;
use Exception; use Exception;
use Jawira\CaseConverter\CaseConverterException; use Jawira\CaseConverter\CaseConverterException;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Jawira\CaseConverter\Convert; use Jawira\CaseConverter\Convert;
@ -211,6 +212,11 @@ class Config
} elseif (!Video::checkCommand([$this->python, '--version'])) { } elseif (!Video::checkCommand([$this->python, '--version'])) {
throw new Exception("Can't find Python at " . $this->python); throw new Exception("Can't find Python at " . $this->python);
} }
if (!class_exists(Debug::class)) {
// Dev dependencies are probably not installed.
$this->debug = false;
}
} }
/** /**