From 033d7cc7047868d7a0ea91bdcc4c7706927f9ef0 Mon Sep 17 00:00:00 2001 From: Alexey Katsman Date: Thu, 16 Oct 2025 11:39:07 +0200 Subject: [PATCH] [python] PY-83881: Remove check for new project when configuring SDK GitOrigin-RevId: d610fa41848daf0512640c5a87d98d85cf29382d --- .../pycharm/community/ide/impl/PythonSdkConfigurator.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/PythonSdkConfigurator.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/PythonSdkConfigurator.kt index a1fb63eec505..8e5d81c1d625 100644 --- a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/PythonSdkConfigurator.kt +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/PythonSdkConfigurator.kt @@ -54,8 +54,12 @@ class PythonSdkConfigurator : DirectoryProjectConfigurator { override fun configureProject(project: Project, baseDir: VirtualFile, moduleRef: Ref, isProjectCreatedWithWizard: Boolean) { val sdk = project.pythonSdk - thisLogger().debug { "Input: $sdk, $isProjectCreatedWithWizard" } - if (sdk != null || isProjectCreatedWithWizard) { + thisLogger().debug { "Input: $sdk" } + /* + * Technically, we can end up in a situation when we created a project, but failed to configure SDK for some reason, which would + * lead to automatic SDK configuration. + */ + if (sdk != null) { return } if (PySdkFromEnvironmentVariable.getPycharmPythonPathProperty()?.isNotBlank() == true) {