Merge pull request #3936 from beganovich/v2-2707-setup-page-fixes

Setup page improvements
This commit is contained in:
David Bomba 2020-07-28 07:46:07 +10:00 committed by GitHub
commit 0c81210bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 16 deletions

View File

@ -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;
}
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

View File

@ -3238,6 +3238,8 @@ return [
'checkout_authorize_label' => 'Checkout.com can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Save card" during payment process.',
'node_status' => 'Node status',
'npm_status' => 'NPM status',
'node_status_not_found' => 'I could not find Node anywhere. Is it installed?',
'npm_status_not_found' => 'I could not find NPM anywhere. Is it installed?',
'locked_invoice' => 'This invoice is locked and unable to be modified',