[eel] EelApi.where: function should return EelPath.Absolute

GitOrigin-RevId: 37fd2d2174c539434813246c0b6deed078a0be32
This commit is contained in:
Andrii Zinchenko
2024-09-26 19:44:05 +00:00
committed by intellij-monorepo-bot
parent 3a6c75410b
commit 10174b3f09
@@ -79,7 +79,7 @@ suspend fun EelProcess.awaitExecutionResult() = computeDetached {
* }
* ```
*/
suspend fun EelApi.where(exe: String): String? {
suspend fun EelApi.where(exe: String): EelPath.Absolute? {
val tool = when (this) {
is EelPosixApi -> "which"
is EelWindowsApi -> "where.exe"
@@ -93,6 +93,6 @@ suspend fun EelApi.where(exe: String): String? {
return null
}
else {
return String(result.stdOut).trim()
return fs.getPath(result.stdout).unwrap()
}
}