PyCharm ExecService: provide a listener to awaitWithReporting to capture output.

It is not convenient to use progress reporting: it is sometimes better to collect it explicitly to customize output

GitOrigin-RevId: 79a68ec8b35540cfdc6aab4fda54245a7a270247
This commit is contained in:
Ilya.Kazakevich
2025-05-13 21:22:14 +00:00
committed by intellij-monorepo-bot
parent bb4f0929c4
commit d04ce81a54
8 changed files with 128 additions and 66 deletions
@@ -56,11 +56,11 @@ class HatchRuntime(
* Doesn't make any validation of stdout/stderr content.
*/
internal suspend fun <T> execute(vararg arguments: String, processOutputTransformer: ProcessOutputTransformer<T>): Result<T, ExecError> {
return execService.execute(hatchBinary, arguments.toList(), execOptions, processOutputTransformer)
return execService.execute(hatchBinary, arguments.toList(), execOptions, processOutputTransformer = processOutputTransformer)
}
internal suspend fun <T> executeInteractive(vararg arguments: String, processSemiInteractiveFun: ProcessSemiInteractiveFun<T>): Result<T, ExecError> {
return execService.executeInteractive(hatchBinary, arguments.toList(), execOptions, processSemiInteractiveHandler(processSemiInteractiveFun))
return execService.executeInteractive(hatchBinary, arguments.toList(), execOptions, processSemiInteractiveHandler(code = processSemiInteractiveFun))
}
internal suspend fun resolvePythonVirtualEnvironment(pythonHomePath: PythonHomePath): PyResult<PythonVirtualEnvironment> {