diff --git a/python/src/com/jetbrains/python/run/PythonScripts.kt b/python/src/com/jetbrains/python/run/PythonScripts.kt index 6a0d85a1cbe4..074be96bc640 100644 --- a/python/src/com/jetbrains/python/run/PythonScripts.kt +++ b/python/src/com/jetbrains/python/run/PythonScripts.kt @@ -16,7 +16,6 @@ import com.intellij.execution.target.TargetEnvironmentRequest import com.intellij.execution.target.TargetPlatform import com.intellij.execution.target.TargetedCommandLine import com.intellij.execution.target.TargetedCommandLineBuilder -import com.intellij.execution.target.getTargetPaths import com.intellij.execution.target.local.LocalTargetPtyOptions import com.intellij.execution.target.value.TargetEnvironmentFunction import com.intellij.execution.target.value.TargetValue @@ -137,7 +136,7 @@ private fun applyRunToolAsync( .onSuccess { originalExe: String? -> commandLineBuilder.exePath = TargetValue.fixed(runTool.exe) commandLineBuilder.addFixedParametersAt(0, runTool.args) - if (!runTool.dropOldExe && originalExe != null) { + if (originalExe != null) { commandLineBuilder.addParameterAt(runTool.args.size, originalExe) } } diff --git a/python/src/com/jetbrains/python/run/features/PyRunToolProvider.kt b/python/src/com/jetbrains/python/run/features/PyRunToolProvider.kt index cc43da7685c3..38c3b6a2c89a 100644 --- a/python/src/com/jetbrains/python/run/features/PyRunToolProvider.kt +++ b/python/src/com/jetbrains/python/run/features/PyRunToolProvider.kt @@ -44,14 +44,12 @@ data class PyRunToolData( * @property exe The path to the Python executable or script. * @property args A list of arguments to be passed to the executable. * @property envs A map of environment variables to be used during execution. - * @property dropOldExe Since we replace the original exe with a new one, we can drop the old executable altogether with this flag. */ @ApiStatus.Internal data class PyRunToolParameters( val exe: String, val args: List, val envs: Map, - val dropOldExe: Boolean, ) /** diff --git a/python/src/com/jetbrains/python/sdk/uv/run/UvRunToolProvider.kt b/python/src/com/jetbrains/python/sdk/uv/run/UvRunToolProvider.kt index fc46777a9af2..60c009eced22 100644 --- a/python/src/com/jetbrains/python/sdk/uv/run/UvRunToolProvider.kt +++ b/python/src/com/jetbrains/python/sdk/uv/run/UvRunToolProvider.kt @@ -28,7 +28,7 @@ internal class UvRunToolProvider : PyRunToolProvider { env += "VIRTUAL_ENV" to it env += "UV_PROJECT_ENVIRONMENT" to it } - return PyRunToolParameters(requireNotNull(uvExecutable) { "Unable to find uv executable." }, listOf("run"), env, dropOldExe = true) + return PyRunToolParameters(requireNotNull(uvExecutable) { "Unable to find uv executable." }, listOf("run"), env) } override val runToolData: PyRunToolData = PyRunToolData(