Skip to content
Merged
Prev Previous commit
Next Next commit
Change how we fetch previously set env vars
  • Loading branch information
Kartik Raj
Kartik Raj committed Aug 3, 2023
commit f6a14bb8a7fc99bd33faaa3b3403b67d950f9913
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"theme": "dark"
},
"engines": {
"vscode": "^1.79.0-20230526"
"vscode": "^1.81"
},
"enableTelemetry": false,
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
}
}

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

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