Skip to content

Commit 6847887

Browse files
committed
fix delete pattern
1 parent 6db24ce commit 6847887

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/features/terminal/terminalEnvVarInjector.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)