@@ -43,7 +43,7 @@ export interface IRemoteService {
43
43
getWorkspaceSSHDestination ( wsData : WorkspaceData ) : Promise < { destination : SSHDestination ; password ?: string } > ;
44
44
showSSHPasswordModal ( wsData : WorkspaceData , password : string ) : Promise < void > ;
45
45
46
- updateRemoteSSHConfig ( ) : Promise < void > ;
46
+ updateRemoteConfig ( ) : Promise < void > ;
47
47
initializeRemoteExtensions ( ) : Promise < void > ;
48
48
}
49
49
@@ -329,19 +329,41 @@ export class RemoteService extends Disposable implements IRemoteService {
329
329
throw new Error ( 'SSH password modal dialog, Canceled' ) ;
330
330
}
331
331
332
- async updateRemoteSSHConfig ( ) {
333
- const remoteSSHconfig = vscode . workspace . getConfiguration ( 'remote.SSH' ) ;
334
- const defaultExtConfigInfo = remoteSSHconfig . inspect < string [ ] > ( 'defaultExtensions' ) ;
335
- const defaultExtensions = defaultExtConfigInfo ?. globalValue ?? [ ] ;
336
- if ( ! defaultExtensions . includes ( 'gitpod.gitpod-remote-ssh' ) ) {
337
- defaultExtensions . unshift ( 'gitpod.gitpod-remote-ssh' ) ;
338
- await remoteSSHconfig . update ( 'defaultExtensions' , defaultExtensions , vscode . ConfigurationTarget . Global ) ;
339
- }
340
-
341
- const currentConfigFile = remoteSSHconfig . get < string > ( 'configFile' ) ;
342
- if ( currentConfigFile ?. includes ( 'gitpod_ssh_config' ) ) {
343
- await remoteSSHconfig . update ( 'configFile' , undefined , vscode . ConfigurationTarget . Global ) ;
344
- }
332
+ async updateRemoteConfig ( ) {
333
+ const remoteSSHconfig = vscode . workspace . getConfiguration ( 'remote.SSH' ) ;
334
+ const defaultSSHExtConfigInfo =
335
+ remoteSSHconfig . inspect < string [ ] > ( 'defaultExtensions' ) ;
336
+ const defaultSSHExtensions = defaultSSHExtConfigInfo ?. globalValue ?? [ ] ;
337
+ if ( ! defaultSSHExtensions . includes ( 'gitpod.gitpod-remote-ssh' ) ) {
338
+ defaultSSHExtensions . unshift ( 'gitpod.gitpod-remote-ssh' ) ;
339
+ await remoteSSHconfig . update (
340
+ 'defaultExtensions' ,
341
+ defaultSSHExtensions ,
342
+ vscode . ConfigurationTarget . Global ,
343
+ ) ;
344
+ }
345
+
346
+ const remoteDevContainerConfig =
347
+ vscode . workspace . getConfiguration ( 'dev.containers' ) ;
348
+ const defaultDevContainerExtConfigInfo = remoteDevContainerConfig . inspect < string [ ] > ( 'defaultExtensions' ) ;
349
+ const defaultDevContainerExtensions = defaultDevContainerExtConfigInfo ?. globalValue ?? [ ] ;
350
+ if ( ! defaultDevContainerExtensions . includes ( 'gitpod.gitpod-remote-ssh' ) ) {
351
+ defaultDevContainerExtensions . unshift ( 'gitpod.gitpod-remote-ssh' ) ;
352
+ await remoteDevContainerConfig . update (
353
+ 'defaultExtensions' ,
354
+ defaultDevContainerExtensions ,
355
+ vscode . ConfigurationTarget . Global ,
356
+ ) ;
357
+ }
358
+
359
+ const currentConfigFile = remoteSSHconfig . get < string > ( 'configFile' ) ;
360
+ if ( currentConfigFile ?. includes ( 'gitpod_ssh_config' ) ) {
361
+ await remoteSSHconfig . update (
362
+ 'configFile' ,
363
+ undefined ,
364
+ vscode . ConfigurationTarget . Global ,
365
+ ) ;
366
+ }
345
367
}
346
368
347
369
async initializeRemoteExtensions ( ) {
@@ -379,9 +401,10 @@ export class RemoteService extends Disposable implements IRemoteService {
379
401
throw e ;
380
402
}
381
403
this . telemetryService . sendUserFlowStatus ( 'synced' , flowData ) ;
382
- } catch {
404
+ } catch ( error ) {
383
405
const msg = `Error while installing local extensions on remote.` ;
384
406
this . logService . error ( msg ) ;
407
+ this . logService . trace ( error ) ;
385
408
386
409
const status = 'failed' ;
387
410
const seeLogs = 'See Logs' ;
0 commit comments