[python] (PY-84251) check for invalid executable

(cherry picked from commit 1f530f9b03058bdf9997f68aeeb34c06c3785bea)

IJ-MR-178452

GitOrigin-RevId: 0abb76aaf9998e937facb0fdd5109b0131f7f26e
This commit is contained in:
Vitaly Legchilkin
2025-10-15 17:53:40 +00:00
committed by intellij-monorepo-bot
parent 3f4de13d28
commit f0b20abc45
@@ -45,7 +45,7 @@ import kotlin.io.path.exists
import kotlin.io.path.readText
internal class EnvironmentCreatorUv<P: PathHolder>(
internal class EnvironmentCreatorUv<P : PathHolder>(
model: PythonMutableTargetAddInterpreterModel<P>,
private val module: Module?,
errorSink: ErrorSink,
@@ -120,14 +120,14 @@ internal class EnvironmentCreatorUv<P: PathHolder>(
)
}
if (executable == null) {
return@onEach
}
versionComboBox.removeAllItems()
versionComboBox.addItem(null)
versionComboBox.selectedItem = null
if (executable?.validationResult?.successOrNull == null) {
return@onEach
}
try {
loading.set(true)