diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php index 9d0f031202e5..b752c377647c 100644 --- a/app/Utils/SystemHealth.php +++ b/app/Utils/SystemHealth.php @@ -49,17 +49,25 @@ class SystemHealth if (in_array(false, Arr::dot(self::extensions()))) { $system_health = false; - } - + } + if (phpversion() < self::$php_version) { $system_health = false; - } + } if(!self::simpleDbCheck() && $check_database) { info("db fails"); $system_health = false; } + if (!self::checkNode()) { + $system_health = false; + } + + if (!self::checkNpm()) { + $system_health = false; + } + return [ 'system_health' => $system_health, 'extensions' => self::extensions(), @@ -82,14 +90,13 @@ class SystemHealth exec('node -v', $foo, $exitCode); if ($exitCode === 0) { - return $foo[0]; + return true; } - + + return false; } catch (\Exception $e) { - - return false; + return false; } - } public static function checkNpm() @@ -98,14 +105,14 @@ class SystemHealth exec('npm -v', $foo, $exitCode); if ($exitCode === 0) { - return $foo[0]; - } + return true; + } - }catch (\Exception $e) { - - return false; + return false; + + } catch (\Exception $e) { + return false; } - } private static function simpleDbCheck() :bool