From 77f4d62b64c7f3cfd6304b4593e5877f6089fa2c Mon Sep 17 00:00:00 2001 From: Roman Vasiliev Date: Fri, 25 Apr 2025 14:50:17 +0200 Subject: [PATCH] [evaluation-plugin] Set python sdk by force if it hasn't yet during module configuration GitOrigin-RevId: 4e3605ff817ce8afbe40b6bc48f97c5686796f5f --- .../cce/python/evaluation/SetupPythonInterpreterStep.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/evaluation-plugin/languages/python/src/com/intellij/cce/python/evaluation/SetupPythonInterpreterStep.kt b/plugins/evaluation-plugin/languages/python/src/com/intellij/cce/python/evaluation/SetupPythonInterpreterStep.kt index fd15ae3b3b74..b1184073450b 100644 --- a/plugins/evaluation-plugin/languages/python/src/com/intellij/cce/python/evaluation/SetupPythonInterpreterStep.kt +++ b/plugins/evaluation-plugin/languages/python/src/com/intellij/cce/python/evaluation/SetupPythonInterpreterStep.kt @@ -130,6 +130,9 @@ private class SetupPythonInterpreterStep( for (module in ModuleManager.getInstance(project).modules) { PyProjectSdkConfiguration.setReadyToUseSdk(project, module, sdk) } + if (ProjectRootManager.getInstance(project).projectSdk == null) { + ProjectRootManager.getInstance(project).projectSdk = sdk + } } println("Python interpreter \"${sdk.name}\" (${sdk.homePath}) will be used as a project SDK") resultSdk = sdk