mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[python] IJPL-165 Get rid of creating SDK with the same path twice
In python tests we have cases when SDK which was previously created at `com.jetbrains.env.PyEnvTaskRunner.getSdk` created one more time at `com.jetbrains.env.PyEnvTaskRunner#runTask:104`. So, simple check was added to avoid such cases GitOrigin-RevId: 8a4836182861dd8421b728b4361977cad68fcbf3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
435955aad0
commit
3dc9ebfec4
@@ -46,8 +46,10 @@ public abstract class CreateConfigurationTask<T extends AbstractPythonRunConfigu
|
||||
|
||||
@Override
|
||||
public void runTestOn(@NotNull final String sdkHome, @Nullable Sdk existingSdk) throws InvalidSdkException {
|
||||
|
||||
createTempSdk(sdkHome, SdkCreationType.SDK_PACKAGES_ONLY);
|
||||
if (!existingSdk.getHomePath().equals(sdkHome)) {
|
||||
// Creates SDK that doesn't exist yet
|
||||
createTempSdk(sdkHome, SdkCreationType.SDK_PACKAGES_ONLY);
|
||||
}
|
||||
ApplicationManager.getApplication().invokeAndWait(() -> ApplicationManager.getApplication().runWriteAction(() -> {
|
||||
|
||||
for (final PsiElement elementToRightClickOn : getPsiElementsToRightClickOn()) {
|
||||
|
||||
Reference in New Issue
Block a user