Skip to content

Commit 6a60c92

Browse files
authored
move clear envCollection to after await (#24921)
fixes #24914
1 parent 6b7d8d1 commit 6a60c92

File tree

1 file changed

+2
-1
lines changed
  • src/client/terminals/envCollectionActivation

1 file changed

+2
-1
lines changed

src/client/terminals/envCollectionActivation/service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
221221
env.PS1 = await this.getPS1(shell, resource, env);
222222
const defaultPrependOptions = await this.getPrependOptions();
223223

224+
const deactivate = await this.terminalDeactivateService.getScriptLocation(shell, resource);
224225
// Clear any previously set env vars from collection
225226
envVarCollection.clear();
226-
const deactivate = await this.terminalDeactivateService.getScriptLocation(shell, resource);
227+
227228
Object.keys(env).forEach((key) => {
228229
if (shouldSkip(key)) {
229230
return;

0 commit comments

Comments
 (0)