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 authored and backportbot-libresign[bot] committed Feb 24, 2024
1 parent ec9c8cf commit 35cf760
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 @@ -238,6 +238,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 35cf760

Please sign in to comment.