Don't add all system env variables to the process (PY-21648)
[idea/community.git] / python / src / com / jetbrains / python / run / PyVirtualEnvReader.kt
index 7b412a228a4565de4cbff00c64b833184c4baeb0..792bcc794ab018f98d92c1f26d03fad9b8ea0ba2 100644 (file)
@@ -31,6 +31,11 @@ import java.io.File
 class PyVirtualEnvReader(val virtualEnvSdkPath: String) : EnvironmentUtil.ShellEnvReader() {
   private val LOG = Logger.getInstance("#com.jetbrains.python.run.PyVirtualEnvReader")
 
+  companion object {
+    val virtualEnvVars = listOf("PATH", "PS1", "VIRTUAL_ENV", "PYTHONHOME", "PROMPT", "_OLD_VIRTUAL_PROMPT", "_OLD_VIRTUAL_PYTHONHOME",
+                                "_OLD_VIRTUAL_PATH")
+  }
+
   // in case of Conda we need to pass an argument to an activate script that tells which exactly environment to activate
   val activate: Pair<String, String?>? = findActivateScript(virtualEnvSdkPath, shell)