Skip to content

Commit aff035a

Browse files
Return early in activate from env var collection (#25286)
Resolves: #25275 #25284 It seems like python env var experiment is interfering when env extension is being used. We should not implicit activate with env var experiment if environment extension is installed and being used. --------- Co-authored-by: Eleanor Boyd <[email protected]>
1 parent c9c8b68 commit aff035a

File tree

1 file changed

+8
-0
lines changed
  • src/client/terminals/envCollectionActivation

1 file changed

+8
-0
lines changed

src/client/terminals/envCollectionActivation/service.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
9797

9898
public async activate(resource: Resource): Promise<void> {
9999
try {
100+
if (useEnvExtension()) {
101+
traceVerbose('Ignoring environment variable experiment since env extension is being used');
102+
this.context.environmentVariableCollection.clear();
103+
// Needed for shell integration
104+
await registerPythonStartup(this.context);
105+
return;
106+
}
107+
100108
if (!inTerminalEnvVarExperiment(this.experimentService)) {
101109
this.context.environmentVariableCollection.clear();
102110
await this.handleMicroVenv(resource);

0 commit comments

Comments
 (0)