Skip to content

Commit

Permalink
fix #7973: Collect env vars lowercase on windows
Browse files Browse the repository at this point in the history
- Populate local copy of environment variables with lowercase keys if on
Windows platform
- Fix #7973: Environment variables are not retrieved properly on Windows
- Update changelog

Signed-off-by: David Schafhauser <schafhauser.david@gmail.com>
  • Loading branch information
dschafhauser authored and kittaakos committed Jun 29, 2020
1 parent e4d87c7 commit 68a3453
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## v1.4.0

- [core] fixed handling of environment variables on Windows [#7973](https://github.com/eclipse-theia/theia/pull/7973)

## v1.3.0

- [cli] updated the download script to warn about mandatory `theiaPlugins` field [#8058](https://github.com/eclipse-theia/theia/pull/8058)
Expand Down Expand Up @@ -49,7 +53,6 @@ Breaking Changes:
- [shell] updated `ApplicationShell.TrackableWidgetProvider.getTrackableWidgets` to be synchronous in order to register child widgets in the same tick [#7957](https://github.com/eclipse-theia/theia/pull/7957)
- use `ApplicationShell.TrackableWidgetProvider.onDidChangeTrackableWidgets` if child widgets are added asynchronously


## v1.2.0

- [application-manager] added ability for clients to add `windowOptions` using an IPC-Event [#7803](https://github.com/eclipse-theia/theia/pull/7803)
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/node/env-variables/env-variables-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export class EnvVariablesServerImpl implements EnvVariablesServer {
constructor() {
const prEnv = process.env;
Object.keys(prEnv).forEach((key: string) => {
this.envs[key] = { 'name': key, 'value': prEnv[key] };
let keyName = key;
if (isWindows) {
keyName = key.toLowerCase();
}
this.envs[keyName] = { 'name': keyName, 'value': prEnv[key] };
});
}

Expand Down

0 comments on commit 68a3453

Please sign in to comment.