Skip to content

Commit f6a14bb

Browse files
author
Kartik Raj
committed
Change how we fetch previously set env vars
1 parent 43e5f6d commit f6a14bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"theme": "dark"
4747
},
4848
"engines": {
49-
"vscode": "^1.79.0-20230526"
49+
"vscode": "^1.81"
5050
},
5151
"enableTelemetry": false,
5252
"keywords": [

src/client/interpreter/activation/terminalEnvVarCollectionService.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
164164
}
165165
}
166166

167-
for (const key in previousEnv) {
168-
// If the previous env var is not in the current env, clear it from collection.
167+
envVarCollection.forEach((key) => {
168+
// If a previously set env var is not in the current env, clear it from collection.
169169
if (!(key in env)) {
170170
traceVerbose(`Clearing environment variable ${key} from collection`);
171171
envVarCollection.delete(key);
172172
}
173-
}
173+
});
174174

175175
const displayPath = this.pathUtils.getDisplayName(settings.pythonPath, workspaceFolder?.uri.fsPath);
176176
const description = new MarkdownString(`${Interpreters.activateTerminalDescription} \`${displayPath}\``);

0 commit comments

Comments
 (0)