diff --git a/packages/core/src/node/env-variables/env-variables-server.ts b/packages/core/src/node/env-variables/env-variables-server.ts index a878c75ec718d..166de48dedfed 100644 --- a/packages/core/src/node/env-variables/env-variables-server.ts +++ b/packages/core/src/node/env-variables/env-variables-server.ts @@ -16,6 +16,7 @@ import { injectable } from 'inversify'; import { EnvVariable, EnvVariablesServer } from '../../common/env-variables'; +import { isWindows } from '../../common/os'; @injectable() export class EnvVariablesServerImpl implements EnvVariablesServer { @@ -38,6 +39,9 @@ export class EnvVariablesServerImpl implements EnvVariablesServer { } async getValue(key: string): Promise { + if (isWindows) { + key = key.toLowerCase(); + } return this.envs[key]; } } diff --git a/packages/variable-resolver/src/browser/common-variable-contribution.ts b/packages/variable-resolver/src/browser/common-variable-contribution.ts index 88533377474b4..4d09b988d44f7 100644 --- a/packages/variable-resolver/src/browser/common-variable-contribution.ts +++ b/packages/variable-resolver/src/browser/common-variable-contribution.ts @@ -56,7 +56,8 @@ export class CommonVariableContribution implements VariableContribution { name: 'env', resolve: async (_, envVariableName) => { const envVariable = envVariableName && await this.env.getValue(envVariableName); - return envVariable && envVariable.value; + const envValue = envVariable && envVariable.value; + return envValue || ''; } }); variables.registerVariable({