From 9dcc2e8aaf1131f1437cce41ab67d4bd0d280b16 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Mon, 26 Jun 2017 17:37:48 +0300 Subject: [PATCH] expose INTELLIJ_ENVIRONMENT_READER env var when loading shell env as TMUX env var has an illegal value That will allow configuration shell scripts to check for its presense and skip some tool configuration (e.g. tmux from WEB-27433) IDEA-CR-22283 --- platform/util/src/com/intellij/util/EnvironmentUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/util/src/com/intellij/util/EnvironmentUtil.java b/platform/util/src/com/intellij/util/EnvironmentUtil.java index e1a1042eb8c9..52a81aea9cfc 100644 --- a/platform/util/src/com/intellij/util/EnvironmentUtil.java +++ b/platform/util/src/com/intellij/util/EnvironmentUtil.java @@ -153,7 +153,7 @@ public class EnvironmentUtil { } private static final String DISABLE_OMZ_AUTO_UPDATE = "DISABLE_AUTO_UPDATE"; - private static final String TMUX = "TMUX"; + private static final String INTELLIJ_ENVIRONMENT_READER = "INTELLIJ_ENVIRONMENT_READER"; private static Map getShellEnv() throws Exception { return new ShellEnvReader().readShellEnv(); @@ -220,7 +220,7 @@ public class EnvironmentUtil { } if (workingDir != null) builder.directory(workingDir); builder.environment().put(DISABLE_OMZ_AUTO_UPDATE, "true"); - builder.environment().put(TMUX, "disabled by IntelliJ"); + builder.environment().put(INTELLIJ_ENVIRONMENT_READER, "true"); Process process = builder.start(); StreamGobbler gobbler = new StreamGobbler(process.getInputStream()); int rv = waitAndTerminateAfter(process, SHELL_ENV_READING_TIMEOUT); @@ -257,7 +257,7 @@ public class EnvironmentUtil { @NotNull private static Map parseEnv(String text, String lineSeparator) throws Exception { - Set toIgnore = new HashSet(Arrays.asList("_", "PWD", "SHLVL", DISABLE_OMZ_AUTO_UPDATE, TMUX)); + Set toIgnore = new HashSet(Arrays.asList("_", "PWD", "SHLVL", DISABLE_OMZ_AUTO_UPDATE, INTELLIJ_ENVIRONMENT_READER)); Map env = System.getenv(); Map newEnv = new HashMap();