[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:
Andrii Zinchenko
2025-07-05 11:12:54 +00:00
committed by intellij-monorepo-bot
parent 6c61e3fac0
commit 2626753245
2 changed files with 32 additions and 10 deletions
@@ -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)
}
}