@@ -116,10 +116,6 @@ async function _activate(extensionContext: extensionApi.ExtensionContext): Promi
116
116
} ) ;
117
117
extensionContext . subscriptions . push ( provider ) ;
118
118
119
- if ( status !== 'not-installed' ) {
120
- registerProviderLifecycle ( provider , extensionContext , telemetryLogger ) ;
121
- }
122
-
123
119
if ( crcStatus . getProviderStatus ( ) === 'installed' || crcStatus . status . CrcStatus === 'No Cluster' ) {
124
120
registerProviderConnectionFactory ( provider , extensionContext , telemetryLogger ) ;
125
121
}
@@ -162,7 +158,6 @@ async function _activate(extensionContext: extensionApi.ExtensionContext): Promi
162
158
if ( ! setupResult ) {
163
159
return ;
164
160
}
165
- registerProviderLifecycle ( provider , extensionContext , telemetryLogger ) ;
166
161
registerProviderConnectionFactory ( provider , extensionContext , telemetryLogger ) ;
167
162
await connectToCrc ( ) ;
168
163
addCommands ( telemetryLogger ) ;
@@ -213,28 +208,6 @@ async function registerCrcUpdate(
213
208
}
214
209
}
215
210
216
- function registerProviderLifecycle (
217
- provider : extensionApi . Provider ,
218
- extensionContext : extensionApi . ExtensionContext ,
219
- telemetryLogger : extensionApi . TelemetryLogger ,
220
- ) : void {
221
- const providerLifecycle : extensionApi . ProviderLifecycle = {
222
- status : ( ) => {
223
- return crcStatus . getProviderStatus ( ) ;
224
- } ,
225
- start : async context => {
226
- provider . updateStatus ( 'starting' ) ;
227
- await startCrc ( provider , context . log , telemetryLogger ) ;
228
- } ,
229
- stop : ( ) => {
230
- provider . updateStatus ( 'stopping' ) ;
231
- return stopCrc ( telemetryLogger ) ;
232
- } ,
233
- } ;
234
-
235
- extensionContext . subscriptions . push ( provider . registerLifecycle ( providerLifecycle ) ) ;
236
- }
237
-
238
211
function registerProviderConnectionFactory (
239
212
provider : extensionApi . Provider ,
240
213
extensionContext : extensionApi . ExtensionContext ,
0 commit comments