mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Don't show setup page if node or npm are missing
This commit is contained in:
parent
c2cae00016
commit
deb6a18e79
@ -60,6 +60,14 @@ class SystemHealth
|
||||
$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;
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
return false;
|
||||
} catch (\Exception $e) {
|
||||
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;
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static function simpleDbCheck() :bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user