Python: report wrong version string

GitOrigin-RevId: ebdcf4f5be07bd1a7ff4bffd2b81a7114c2f283e
This commit is contained in:
Ilya.Kazakevich
2025-09-02 13:39:36 +02:00
committed by intellij-monorepo-bot
parent 22f79b04fa
commit 0fecbf2ca1

View File

@@ -38,7 +38,7 @@ internal suspend fun ExecService.validatePythonAndGetVersionImpl(python: Executa
val versionString = versionOutput.stdoutString.let { it.ifBlank { versionOutput.stderrString } }
val languageLevel = getLanguageLevelFromVersionStringStaticSafe(versionString.trim())
if (languageLevel == null) {
return@withContext PyResult.localizedError(message("python.get.version.wrong.version", python.userReadableName, versionOutput))
return@withContext PyResult.localizedError(message("python.get.version.wrong.version", python.userReadableName, versionString))
}
return@withContext Result.success(languageLevel)
}