Skip to content

collection applied twice for second terminal #183836

@meganrogge

Description

@meganrogge

Testing #182970

In my extension's activate function, I have:

vscode.window.createTerminal({
	name: `Ext Terminal tranisent #${NEXT_TERM_ID++}`,
	isTransient: true
} as any);
vscode.window.createTerminal({
	name: `Ext Terminal tranisent #${NEXT_TERM_ID++}`,
	isTransient: true,
	shellPath: 'fish'
} as any);
const collection = context.environmentVariableCollection;
collection.replace('FOO', 'REPLACED', { applyAtShellIntegration: true });
collection.append('APPENDING', 'appending', { applyAtShellIntegration: true })
collection.prepend('PREPENDING', 'prepending', { applyAtShellIntegration: true });

When the extension activates, I log the env in each terminal. In the first, zsh, the mutations are applied right next to each-other in order

Screenshot 2023-05-30 at 11 53 15 AM

In the second, fish, I see that they're applied in a different order and the appending / prepending happens twice. I'm not sure if this is expected.
Screenshot 2023-05-30 at 11 52 55 AM
Screenshot 2023-05-30 at 11 51 56 AM

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions