Skip to content

Commit

Permalink
fix: check linux distro when get java path
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>

[skip ci]
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Sep 10, 2024
1 parent 028c760 commit 80ca338
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/Install/SignSetupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ public function getInstallPath(): string {
case 'java':
$path = $this->appConfig->getAppValue('java_path');
$installPath = substr($path, 0, -strlen('/bin/java'));
$expected = "{$this->instanceId}/libresign/{$this->architecture}/{$this->distro}/java";
$distro = $this->getLinuxDistributionToDownloadJava();
$expected = "{$this->instanceId}/libresign/{$this->architecture}/{$distro}/java";
if (!str_contains($installPath, $expected)) {
$installPath = preg_replace(
"/{$this->instanceId}\/libresign\/(\w+)\/(\w+)\/java/i",
Expand Down

0 comments on commit 80ca338

Please sign in to comment.