Skip to content

Commit a5a3d98

Browse files
deboer-timakosyakov
authored andcommitted
Reuse environment (PATH) instead of overriding it
Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
1 parent 4ad0999 commit a5a3d98

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/java/src/node/java-contribution.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,14 @@ export class JavaContribution extends BaseLanguageServerContribution {
6565
const outSocket = this.accept(outServer);
6666

6767
this.logInfo('logs at ' + path.resolve(workspacePath, '.metadata', '.log'));
68+
const env = Object.create(process.env);
69+
env.STDIN_HOST = inServer.address().address;
70+
env.STDIN_PORT = inServer.address().port;
71+
env.STDOUT_HOST = outServer.address().address;
72+
env.STDOUT_PORT = outServer.address().port;
6873
this.createProcessSocketConnection(inSocket, outSocket, command, args, {
69-
env: {
70-
'STDIN_HOST': inServer.address().address,
71-
'STDIN_PORT': inServer.address().port,
72-
'STDOUT_HOST': outServer.address().address,
73-
'STDOUT_PORT': outServer.address().port
74-
}
74+
env: env
7575
}).then(serverConnection => this.forward(clientConnection, serverConnection));
7676
});
7777
}
78-
7978
}

0 commit comments

Comments
 (0)