File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/client/interpreter/activation Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,13 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
133133 traceVerbose ( 'Activating environments in terminal is disabled for' , resource ?. fsPath ) ;
134134 return ;
135135 }
136- const env = await this . environmentActivationService . getActivatedEnvironmentVariables (
136+ const activatedEnv = await this . environmentActivationService . getActivatedEnvironmentVariables (
137137 resource ,
138138 undefined ,
139139 undefined ,
140140 shell ,
141141 ) ;
142+ const env = activatedEnv ? normCaseKeys ( activatedEnv ) : undefined ;
142143 if ( ! env ) {
143144 const shellType = identifyShellFromShellPath ( shell ) ;
144145 const defaultShell = defaultShells [ this . platform . osType ] ;
@@ -158,7 +159,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
158159 shell ,
159160 ) ;
160161 }
161- const processEnv = this . processEnvVars ;
162+ const processEnv = normCaseKeys ( this . processEnvVars ) ;
162163
163164 // PS1 in some cases is a shell variable (not an env variable) so "env" might not contain it, calculate it in that case.
164165 env . PS1 = await this . getPS1 ( shell , resource , env ) ;
@@ -376,3 +377,11 @@ function getPromptForEnv(interpreter: PythonEnvironment | undefined) {
376377 }
377378 return undefined ;
378379}
380+
381+ function normCaseKeys ( env : EnvironmentVariables ) : EnvironmentVariables {
382+ const result : EnvironmentVariables = { } ;
383+ Object . keys ( env ) . forEach ( ( key ) => {
384+ result [ key . toUpperCase ( ) ] = env [ key ] ;
385+ } ) ;
386+ return result ;
387+ }
You can’t perform that action at this time.
0 commit comments