@@ -40,6 +40,14 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
40
40
@inject ( IExperimentService ) private readonly experiments : IExperimentService ,
41
41
@inject ( IInterpreterPathService ) private readonly interpreterPathService : IInterpreterPathService ,
42
42
) {
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
+ }
43
51
if ( this . workspaceService . isVirtualWorkspace ) {
44
52
this . activationServices = this . activationServices . filter (
45
53
( service ) => service . supportedWorkspaceTypes . virtualWorkspace ,
@@ -80,15 +88,17 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
80
88
}
81
89
this . activatedWorkspaces . add ( key ) ;
82
90
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 ) ;
85
97
}
86
-
87
- await sendActivationTelemetry ( this . fileSystem , this . workspaceService , resource ) ;
88
-
89
- await this . autoSelection . autoSelectInterpreter ( resource ) ;
90
98
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
+ }
92
102
}
93
103
94
104
public async initialize ( ) : Promise < void > {
0 commit comments