Skip to content

Commit 5de4296

Browse files
author
Kartik Raj
committed
Rebase
1 parent 856bcff commit 5de4296

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/client/activation/activationManager.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
4040
@inject(IExperimentService) private readonly experiments: IExperimentService,
4141
@inject(IInterpreterPathService) private readonly interpreterPathService: IInterpreterPathService,
4242
) {
43+
if (!this.workspaceService.isTrusted) {
44+
this.activationServices = this.activationServices.filter(
45+
(service) => service.supportedWorkspaceTypes.untrustedWorkspace,
46+
);
47+
this.singleActivationServices = this.singleActivationServices.filter(
48+
(service) => service.supportedWorkspaceTypes.untrustedWorkspace,
49+
);
50+
}
4351
if (this.workspaceService.isVirtualWorkspace) {
4452
this.activationServices = this.activationServices.filter(
4553
(service) => service.supportedWorkspaceTypes.virtualWorkspace,
@@ -80,15 +88,17 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
8088
}
8189
this.activatedWorkspaces.add(key);
8290

83-
if (this.experiments.inExperimentSync(DeprecatePythonPath.experiment)) {
84-
await this.interpreterPathService.copyOldInterpreterStorageValuesToNew(resource);
91+
if (this.workspaceService.isTrusted) {
92+
if (this.experiments.inExperimentSync(DeprecatePythonPath.experiment)) {
93+
await this.interpreterPathService.copyOldInterpreterStorageValuesToNew(resource);
94+
}
95+
await sendActivationTelemetry(this.fileSystem, this.workspaceService, resource);
96+
await this.autoSelection.autoSelectInterpreter(resource);
8597
}
86-
87-
await sendActivationTelemetry(this.fileSystem, this.workspaceService, resource);
88-
89-
await this.autoSelection.autoSelectInterpreter(resource);
9098
await Promise.all(this.activationServices.map((item) => item.activate(resource)));
91-
await this.appDiagnostics.performPreStartupHealthCheck(resource);
99+
if (this.workspaceService.isTrusted) {
100+
await this.appDiagnostics.performPreStartupHealthCheck(resource);
101+
}
92102
}
93103

94104
public async initialize(): Promise<void> {

0 commit comments

Comments
 (0)