mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform-eel] EelBuildCommandLineBuilder: pass eel env vars in to the PathManager.getDefaultSystemPathFor
- add `getSystemFolder` in to the `EelPathUtils` GitOrigin-RevId: e4f41cb3a107352ecab1c3fe9dd92583effebe53
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6c61e3fac0
commit
2626753245
@@ -116,21 +116,12 @@ class EelBuildCommandLineBuilder(val project: Project, exePath: Path) : BuildCom
|
||||
return remoteServer.asCompletableFuture().get().port.toInt()
|
||||
}
|
||||
|
||||
fun EelPlatform.asPathManagerOs(): PathManager.OS =
|
||||
when (this) {
|
||||
is EelPlatform.Windows -> PathManager.OS.WINDOWS
|
||||
is EelPlatform.Darwin -> PathManager.OS.MACOS
|
||||
is EelPlatform.Linux, is EelPlatform.FreeBSD -> PathManager.OS.LINUX
|
||||
}
|
||||
|
||||
private fun getSystemSubfolder(subfolder: String): Path {
|
||||
return getSystemFolderRoot().resolve(subfolder)
|
||||
}
|
||||
|
||||
private fun getSystemFolderRoot(): Path {
|
||||
val selector = PathManager.getPathsSelector() ?: "IJ-Platform"
|
||||
val userHomeFolder = eel.userInfo.home.asNioPath().toString()
|
||||
return PathManager.getDefaultSystemPathFor(eel.platform.asPathManagerOs(), userHomeFolder, selector)
|
||||
return EelPathUtils.getSystemFolder(eel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user