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:
Andrey Vlasovskikh
2016-09-15 18:58:35 +03:00
parent 75dcac5773
commit 767d72a58b
@@ -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> {