mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
runtime-chooser: XTEST-635 IDEA-264893 handle when "Contents" folder is selected for a JDK on macOS
GitOrigin-RevId: 6906d1310925661e7fb95547101acedf2e37b491
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ce36e881ae
commit
f13e2dbba7
+5
-1
@@ -68,10 +68,14 @@ object RuntimeChooserJreValidator {
|
||||
?: return callback.onError(
|
||||
LangBundle.message("dialog.message.choose.ide.runtime.set.unknown.error", LangBundle.message("dialog.message.choose.ide.runtime.no.file.part")))
|
||||
|
||||
if (SystemInfo.isMac && homeDir.endsWith("Contents/Home")) {
|
||||
if (SystemInfo.isMac && homeDir.toString().endsWith("/Contents/Home")) {
|
||||
return testNewJdkUnderProgress(allowRunProcesses, { homeDir.parent?.parent?.toString() }, callback)
|
||||
}
|
||||
|
||||
if (SystemInfo.isMac && homeDir.fileName.toString() == "Contents" && (homeDir / "Home").isDirectory()) {
|
||||
return testNewJdkUnderProgress(allowRunProcesses, { homeDir.parent?.toString() }, callback)
|
||||
}
|
||||
|
||||
if (SystemInfo.isMac && !(homeDir / "Contents" / "Home").isDirectory()) {
|
||||
LOG.warn("Failed to scan JDK for boot runtime: ${homeDir}. macOS Bundle layout is expected")
|
||||
return callback.onError(LangBundle.message("dialog.message.choose.ide.runtime.set.error.mac.bundle", homeDir))
|
||||
|
||||
Reference in New Issue
Block a user