Skip to content

Commit

Permalink
Add more tests to check if java is ok
Browse files Browse the repository at this point in the history
More informations: #2327 (comment)

Signed-off-by: Vitor Mattos <vitor@php.rio>
  • Loading branch information
vitormattos committed Feb 23, 2024
1 parent 3d5684f commit 054a6eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Service/ConfigureCheckService.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ private function checkJava(): array {
if ($javaPath) {
if (file_exists($javaPath)) {
\exec($javaPath . " -version 2>&1", $javaVersion);
if (empty($javaVersion)) {
return [
(new ConfigureCheckHelper())
->setErrorMessage(
'Failed to execute Java. Sounds that your operational system is blocking the JVM.'
)
->setResource('java')
->setTip('https://github.com/LibreSign/libresign/issues/2327#issuecomment-1961988790'),
];
}
$javaVersion = current($javaVersion);
if ($javaVersion !== InstallService::JAVA_VERSION) {
return [
Expand Down

0 comments on commit 054a6eb

Please sign in to comment.