From 10174b3f09c90231f52b664485566694deb2ebf4 Mon Sep 17 00:00:00 2001 From: Andrii Zinchenko Date: Thu, 26 Sep 2024 19:48:12 +0200 Subject: [PATCH] [eel] EelApi.where: function should return EelPath.Absolute GitOrigin-RevId: 37fd2d2174c539434813246c0b6deed078a0be32 --- .../intellij/platform/eel/provider/utils/eelProcessUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/eelProvider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt b/platform/eelProvider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt index 3ac9ef880a44..fd7ec62af88d 100644 --- a/platform/eelProvider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt +++ b/platform/eelProvider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt @@ -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() } } \ No newline at end of file