For PY-17816 we need only a PATH variable from the environment map

Taking more we can override some useful environments set previously, for example locale as it happens here IDEA-171957
This commit is contained in:
Dmitry Trofimov
2017-05-10 14:34:09 +02:00
parent 0afd759eb1
commit d800511e46
@@ -56,7 +56,10 @@ class PyVirtualEnvTerminalCustomizer : LocalTerminalCustomizer() {
((shellName == "fish") && PythonSdkType.isVirtualEnv(sdk))) { //fish shell works only for virtualenv and not for conda
//for bash we pass activate script to jediterm shell integration (see jediterm-bash.in) to source it there
findActivateScript(path, shellPath)?.let { activate ->
envs.putAll(EnvironmentUtil.getEnvironmentMap())
val pathEnv = EnvironmentUtil.getEnvironmentMap().get("PATH")
if (pathEnv != null) {
envs.put("PATH", pathEnv)
}
envs.put("JEDITERM_SOURCE", if (activate.second != null) "${activate.first} ${activate.second}" else activate.first)
}
}