Take XDG_CONFIG_HOME value from EnvironmentUtil.getEnvironmentMap()
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Fri, 11 Nov 2016 10:32:33 +0000 (11:32 +0100)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Fri, 11 Nov 2016 10:32:33 +0000 (11:32 +0100)
plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java

index a617c35dd438d43781a654f8edd04dafa1830990..3403ae7efbe3fee1b032b4fd456807a9d639aca2 100644 (file)
@@ -208,8 +208,9 @@ public class LocalTerminalDirectRunner extends AbstractTerminalRunner<PtyProcess
             envs.put(ZDOTDIR, new File(rcFilePath).getParent());
           }
           else if (shellName.equals("fish")) {
-            if (StringUtil.isNotEmpty(EnvironmentUtil.getEnvironmentMap().get(XDG_CONFIG_HOME))) {
-              File fishConfig = new File(new File(FileUtil.expandUserHome(envs.get(XDG_CONFIG_HOME)), "fish"), "config.fish");
+            String xdgConfig = EnvironmentUtil.getEnvironmentMap().get(XDG_CONFIG_HOME);
+            if (StringUtil.isNotEmpty(xdgConfig)) {
+              File fishConfig = new File(new File(FileUtil.expandUserHome(xdgConfig), "fish"), "config.fish");
               if (fishConfig.exists()) {
                 envs.put(JEDITERM_USER_RCFILE, fishConfig.getAbsolutePath());
               }