sync
This commit is contained in:
@@ -74,6 +74,21 @@ async function main(customExtractPath) {
|
||||
}
|
||||
}
|
||||
|
||||
async function getPath(customExtractPath) {
|
||||
const requiredVersion = "17"
|
||||
const isJavaInstalled = checkJavaVersion(requiredVersion)
|
||||
|
||||
if (!isJavaInstalled) {
|
||||
if (!fs.existsSync(path.join(customExtractPath, "jdk-17.0.12", "bin", os.platform() == "win32" ? "java.exe" : "java"))) {
|
||||
await main(customExtractPath)
|
||||
} else {
|
||||
return path.join(customExtractPath, "jdk-17.0.12", "bin", os.platform() == "win32" ? "java.exe" : "java")
|
||||
}
|
||||
} else {
|
||||
console.log("No further action is required.")
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
main
|
||||
}
|
||||
Reference in New Issue
Block a user