Skip to content

Commit

Permalink
Change how we fetch previously set env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Aug 3, 2023
1 parent 43e5f6d commit f6a14bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit f6a14bb

Please sign in to comment.