4
0
mirror of https://github.com/AltarikMC/Launcher synced 2024-11-22 06:19:50 +01:00

Fix for linux (and possibily macos) with java exec incorrect filename

This commit is contained in:
Quentin Legot 2023-08-27 11:38:05 +02:00
parent 3eecba8e69
commit df54f665c3

View File

@ -320,10 +320,10 @@ class Minecraft {
resolve(join(jre, "bin", filename)) resolve(join(jre, "bin", filename))
} else { } else {
logger.warn(`java sha256sum ${sha1} don't correspond to ${infos.sha256sum}`) logger.warn(`java sha256sum ${sha1} don't correspond to ${infos.sha256sum}`)
await this.downloadAndExtractJava(infos, downloadFolder, runtime).then(() => resolve(join(jre, "bin", "java.exe"))).catch(err => reject(err)) await this.downloadAndExtractJava(infos, downloadFolder, runtime).then(() => resolve(join(jre, "bin", process.platform === "win32" ? "java.exe" : "java"))).catch(err => reject(err))
} }
} else { } else {
await this.downloadAndExtractJava(infos, downloadFolder, runtime).then(() => resolve(join(jre, "bin", "java.exe"))).catch(err => reject(err)) await this.downloadAndExtractJava(infos, downloadFolder, runtime).then(() => resolve(join(jre, "bin", process.platform === "win32" ? "java.exe" : "java"))).catch(err => reject(err))
} }
event.sender.send("progress", {type: "java", task: 1, total: 1 }) event.sender.send("progress", {type: "java", task: 1, total: 1 })
} else { } else {