From 187ca86a5411fbf886128b585fe4e58439c5bd47 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Fri, 15 Sep 2023 13:34:05 -0700 Subject: [PATCH] Do not upper case custom env variables (#22004) For #20950 closes https://github.com/microsoft/vscode-python/issues/22005 --- .../interpreter/activation/terminalEnvVarCollectionService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/interpreter/activation/terminalEnvVarCollectionService.ts b/src/client/interpreter/activation/terminalEnvVarCollectionService.ts index 75ef8168484b..9bc95ee6d2e3 100644 --- a/src/client/interpreter/activation/terminalEnvVarCollectionService.ts +++ b/src/client/interpreter/activation/terminalEnvVarCollectionService.ts @@ -36,6 +36,7 @@ import { getSearchPathEnvVarNames } from '../../common/utils/exec'; import { EnvironmentVariables } from '../../common/variables/types'; import { TerminalShellType } from '../../common/terminal/types'; import { OSType } from '../../common/utils/platform'; +import { normCase } from '../../common/platform/fs-paths'; @injectable() export class TerminalEnvVarCollectionService implements IExtensionActivationService, ITerminalEnvVarCollectionService { @@ -383,7 +384,7 @@ function getPromptForEnv(interpreter: PythonEnvironment | undefined) { function normCaseKeys(env: EnvironmentVariables): EnvironmentVariables { const result: EnvironmentVariables = {}; Object.keys(env).forEach((key) => { - result[key.toUpperCase()] = env[key]; + result[normCase(key)] = env[key]; }); return result; }