diff --git a/python/openapi/src/com/jetbrains/python/errorProcessing/PyResult.kt b/python/openapi/src/com/jetbrains/python/errorProcessing/PyResult.kt index 11a63083f9de..a8916e84c6ec 100644 --- a/python/openapi/src/com/jetbrains/python/errorProcessing/PyResult.kt +++ b/python/openapi/src/com/jetbrains/python/errorProcessing/PyResult.kt @@ -8,6 +8,10 @@ import com.jetbrains.python.packaging.PyExecutionException * Use it instead of exceptions and Kotlin Result. */ typealias PyResult = com.jetbrains.python.Result +/** + * Like [PyResult] but error is always [ExecError] + */ +typealias PyExecResult = com.jetbrains.python.Result inline fun failure(pyError: T): com.jetbrains.python.Result.Failure = com.jetbrains.python.Result.Companion.failure(pyError) diff --git a/python/src/com/jetbrains/python/sdk/PySdkCommandRunner.kt b/python/src/com/jetbrains/python/sdk/PySdkCommandRunner.kt index 120a7d95296a..c41b00731777 100644 --- a/python/src/com/jetbrains/python/sdk/PySdkCommandRunner.kt +++ b/python/src/com/jetbrains/python/sdk/PySdkCommandRunner.kt @@ -4,7 +4,7 @@ package com.jetbrains.python.sdk import com.intellij.python.community.execService.ExecOptions import com.intellij.python.community.execService.ExecService import com.intellij.python.community.execService.WhatToExec -import com.jetbrains.python.errorProcessing.PyResult +import com.jetbrains.python.errorProcessing.PyExecResult import org.jetbrains.annotations.ApiStatus.Internal import java.nio.file.Path @@ -17,5 +17,5 @@ import java.nio.file.Path * @return A [Result] object containing the output of the command execution. */ @Internal -suspend fun runExecutable(executable: Path, projectPath: Path?, vararg args: String): PyResult = +suspend fun runExecutable(executable: Path, projectPath: Path?, vararg args: String): PyExecResult = ExecService().execGetStdout(WhatToExec.Binary(executable), args.toList(), ExecOptions(workingDirectory = projectPath)) \ No newline at end of file