Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collection applied twice for second terminal #183836

Closed
meganrogge opened this issue May 30, 2023 · 3 comments
Closed

collection applied twice for second terminal #183836

meganrogge opened this issue May 30, 2023 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@meganrogge
Copy link
Contributor

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

@Tyriar
Copy link
Member

Tyriar commented May 30, 2023

This is probably expected because different shells do different things on startup. To be sure, set apply at process creation to false

@Tyriar Tyriar added the info-needed Issue requires more information from poster label May 30, 2023
@meganrogge
Copy link
Contributor Author

does not occur when I set process creation to false

@Tyriar
Copy link
Member

Tyriar commented May 30, 2023

Will bring up in API sync #179476 (comment)

@Tyriar Tyriar closed this as completed May 30, 2023
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label May 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants