mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[eel] IJPL-172897: move where function to the EelExecApi
GitOrigin-RevId: 349bd28772b8bf537ecc8421bccfeb00844ee1b6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5c677a7e6
commit
25825f5e6a
@@ -62,10 +62,6 @@ suspend fun EelProcess.awaitProcessResult(): EelProcessExecutionResult {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun EelExecApi.where(exe: String): EelPath? {
|
||||
return this.findExeFilesInPath(exe).firstOrNull()
|
||||
}
|
||||
|
||||
/**
|
||||
* Given [this] is a binary, executes it with [args] and returns either [EelExecApi.ExecuteProcessError] (couldn't execute) or
|
||||
* [ProcessOutput] as a result of the execution.
|
||||
|
||||
@@ -112,5 +112,9 @@ interface EelExecApi {
|
||||
data object RedirectStdErr : PtyOrStdErrSettings
|
||||
}
|
||||
|
||||
suspend fun EelExecApi.where(exe: String): EelPath? {
|
||||
return this.findExeFilesInPath(exe).firstOrNull()
|
||||
}
|
||||
|
||||
fun EelExecApi.execute(exe: String, vararg args: String): EelExecApiHelpers.Execute =
|
||||
execute(exe).args(*args)
|
||||
@@ -39,7 +39,7 @@ import com.intellij.platform.eel.provider.asNioPath
|
||||
import com.intellij.platform.eel.provider.asNioPathOrNull
|
||||
import com.intellij.platform.eel.provider.getEelDescriptor
|
||||
import com.intellij.platform.eel.provider.utils.fetchLoginShellEnvVariablesBlocking
|
||||
import com.intellij.platform.eel.provider.utils.where
|
||||
import com.intellij.platform.eel.where
|
||||
import com.intellij.platform.ide.progress.runWithModalProgressBlocking
|
||||
import com.intellij.platform.ide.progress.withBackgroundProgress
|
||||
import com.intellij.platform.util.progress.withProgressText
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.intellij.platform.eel.path.EelPath.Companion.parse
|
||||
import com.intellij.platform.eel.path.pathSeparator
|
||||
import com.intellij.platform.eel.provider.asNioPath
|
||||
import com.intellij.platform.eel.provider.getEelDescriptor
|
||||
import com.intellij.platform.eel.provider.utils.where
|
||||
import com.intellij.platform.eel.where
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.impl.source.tree.LeafPsiElement
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package com.intellij.python.junit5Tests.unit.alsoWin
|
||||
import com.intellij.platform.eel.EelPlatform
|
||||
import com.intellij.platform.eel.provider.asNioPath
|
||||
import com.intellij.platform.eel.provider.localEel
|
||||
import com.intellij.platform.eel.provider.utils.where
|
||||
import com.intellij.platform.eel.where
|
||||
import com.intellij.python.community.execService.ExecService
|
||||
import com.intellij.python.community.execService.WhatToExec
|
||||
import com.intellij.testFramework.common.timeoutRunBlocking
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.intellij.platform.eel.EelApi
|
||||
import com.intellij.platform.eel.LocalEelApi
|
||||
import com.intellij.platform.eel.provider.asNioPath
|
||||
import com.intellij.platform.eel.provider.localEel
|
||||
import com.intellij.platform.eel.provider.utils.where
|
||||
import com.intellij.platform.eel.where
|
||||
import com.intellij.python.hatch.runtime.getHatchCommand
|
||||
import com.jetbrains.python.Result
|
||||
import java.nio.file.Path
|
||||
|
||||
Reference in New Issue
Block a user