From 672a1a9754bfae5e1d5be928213766ea9e4d0ac0 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 20 Jun 2020 14:14:38 +0200 Subject: [PATCH] Disable debug mode if dev dependencies are not installed --- classes/Config.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classes/Config.php b/classes/Config.php index 62a1698..e308218 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -8,6 +8,7 @@ namespace Alltube; use Exception; use Jawira\CaseConverter\CaseConverterException; +use Symfony\Component\ErrorHandler\Debug; use Symfony\Component\Yaml\Yaml; use Jawira\CaseConverter\Convert; @@ -211,6 +212,11 @@ class Config } elseif (!Video::checkCommand([$this->python, '--version'])) { throw new Exception("Can't find Python at " . $this->python); } + + if (!class_exists(Debug::class)) { + // Dev dependencies are probably not installed. + $this->debug = false; + } } /**