File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,6 +111,10 @@ export class TerminalEnvVarInjector implements Disposable {
111111 try {
112112 const envVars = await this . envVarManager . getEnvironmentVariables ( workspaceUri ) ;
113113
114+ // use scoped environment variable collection
115+ const envVarScope = this . getEnvironmentVariableCollectionScoped ( { workspaceFolder } ) ;
116+ envVarScope . clear ( ) ; // Clear existing variables for this workspace
117+
114118 // Track which .env file is being used for logging
115119 const config = getConfiguration ( 'python' , workspaceUri ) ; // why did this get .env file?? // returns like all of them
116120 const envFilePath = config . get < string > ( 'envFile' ) ;
@@ -129,10 +133,6 @@ export class TerminalEnvVarInjector implements Disposable {
129133 return ; // No .env file to inject
130134 }
131135
132- // use scoped environment variable collection
133- const envVarScope = this . getEnvironmentVariableCollectionScoped ( { workspaceFolder } ) ;
134- envVarScope . clear ( ) ; // Clear existing variables for this workspace
135-
136136 for ( const [ key , value ] of Object . entries ( envVars ) ) {
137137 if ( value === undefined ) {
138138 // Remove the environment variable if the value is undefined
You can’t perform that action at this time.
0 commit comments