mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Disabled shell env loading on Linux due to exception (PY-15085)
There is no printenv.py on Linux in the PyCharm distribution so PyCharm cannot read the environment variables.
This commit is contained in:
@@ -33,18 +33,22 @@ class PyVirtualEnvReader(val virtualEnvSdkPath: String) : EnvironmentUtil.ShellE
|
||||
val activate = findActivateScript(virtualEnvSdkPath, shell)
|
||||
|
||||
override fun readShellEnv(): MutableMap<String, String> {
|
||||
if (SystemInfo.isUnix) {
|
||||
if (SystemInfo.isMac) {
|
||||
return super.readShellEnv()
|
||||
}
|
||||
else {
|
||||
else if (SystemInfo.isWindows) {
|
||||
if (activate != null) {
|
||||
return readVirtualEnvOnWindows(activate);
|
||||
return readVirtualEnvOnWindows(activate)
|
||||
}
|
||||
else {
|
||||
LOG.error("Can't find activate script for $virtualEnvSdkPath")
|
||||
return mutableMapOf();
|
||||
return mutableMapOf()
|
||||
}
|
||||
}
|
||||
else {
|
||||
// TODO: Support shell env loading on Linux
|
||||
return mutableMapOf()
|
||||
}
|
||||
}
|
||||
|
||||
private fun readVirtualEnvOnWindows(activate: String): MutableMap<String, String> {
|
||||
|
||||
Reference in New Issue
Block a user