mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
PY-71747: Do not fail if remote interpreter has a path with ssh:// prefix.
Some remote interpreters have `sdk#homePath` starting with `ssh://`. Code all over the monorepo assumes that `homePath` is a local file path and tries to convert it to `Path` throwing the exception effectively. There is a `isCustomPythonSdkHomePath` which must be used to check string before trying to convert it into `Path` The current situation (along with "solution") is a legacy from dark ages and will be rewritten to the workspace model soon GitOrigin-RevId: 9adc02f312667571a65ff63d4e802aa7d6dbb518
This commit is contained in:
committed by
intellij-monorepo-bot
parent
82f83b2945
commit
9f06f1a251
@@ -25,10 +25,7 @@ import com.jetbrains.python.PySdkBundle;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.icons.PythonPsiApiIcons;
|
||||
import com.jetbrains.python.run.CommandLinePatcher;
|
||||
import com.jetbrains.python.sdk.PyRemoteSdkAdditionalDataMarker;
|
||||
import com.jetbrains.python.sdk.PySdkUtil;
|
||||
import com.jetbrains.python.sdk.PythonEnvUtil;
|
||||
import com.jetbrains.python.sdk.PythonSdkAdditionalData;
|
||||
import com.jetbrains.python.sdk.*;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -278,7 +275,7 @@ public abstract class PythonSdkFlavor<D extends PyFlavorData> {
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public static PythonSdkFlavor<?> getFlavor(@Nullable String sdkPath) {
|
||||
if (sdkPath == null) return null;
|
||||
if (sdkPath == null || PythonSdkUtil.isCustomPythonSdkHomePath(sdkPath)) return null;
|
||||
|
||||
for (PythonSdkFlavor<?> flavor : getApplicableFlavors()) {
|
||||
if (flavor.isValidSdkHome(sdkPath)) {
|
||||
|
||||
Reference in New Issue
Block a user