JetBrains/la-clojure — Issue #8: 0.3.102 Regression bug: Windows system environment not loaded into REPL
Author: Menthalion
Created: 2011-12-01 14:20:29+00:00
State: open

Regression of a bug originally mentioned in the Plugin Repository comments

>Anonymous
>Rated: noRate
>2010-12-21 06:19:47

>The system environment is empty in REPL. This is why I can't open socket on Windows. Can you please fix it? Below is an >example fix, which works in my side.

>public class ClojureReplProcessHandler extends ProcessHandler {
>final String executablePath = ((JavaSdkType) type).getVMExecutablePath(sdk);

>final ArrayList env = new ArrayList();
>+ for (java.util.Map.Entry entry: System.getenv().entrySet()) {
>+ env.add(entry.getKey() + "=" + entry.getValue());
>+ }
>final ArrayList cmd = new ArrayList();
>cmd.add(executablePath);
>cmd.addAll(line.getParametersList().getList());

This problem among others prevents socket connections being opened from the REPL under Windows, breaking REPL functionality severely. The problem was fixed a few months after the comment, but now occurs again in 0.3.102, released on 31-11-11.