@@ -43,9 +43,11 @@ export async function initializeRemoteExtensions(extensions: ISyncExtension[], c
43
43
const codeCliPath = path . join ( vscode . env . appRoot , 'bin/remote-cli' , appName ) ;
44
44
const args = extensions . map ( e => '--install-extension ' + e . identifier . id ) . join ( ' ' ) ;
45
45
46
+ const execEnv = { ...process . env } ;
47
+ delete execEnv [ 'ELECTRON_RUN_AS_NODE' ]
46
48
try {
47
- context . logger . trace ( 'Trying to initialize remote extensions:' , extensions . map ( e => e . identifier . id ) . join ( '\n' ) ) ;
48
- const { stderr } = await util . promisify ( cp . exec ) ( `${ codeCliPath } ${ args } ` ) ;
49
+ context . logger . info ( 'Trying to initialize remote extensions:' , extensions . map ( e => e . identifier . id ) . join ( '\n' ) ) ;
50
+ const { stderr } = await util . promisify ( cp . exec ) ( `${ codeCliPath } ${ args } ` , { env : execEnv } ) ;
49
51
if ( stderr ) {
50
52
context . logger . error ( 'Failed to initialize remote extensions:' , stderr ) ;
51
53
}
@@ -104,9 +106,11 @@ export async function installInitialExtensions(context: GitpodExtensionContext)
104
106
const codeCliPath = path . join ( vscode . env . appRoot , 'bin/remote-cli' , appName ) ;
105
107
const args = extensions . map ( e => '--install-extension ' + e . toString ( ) ) . join ( ' ' ) ;
106
108
109
+ const execEnv = { ...process . env } ;
110
+ delete execEnv [ 'ELECTRON_RUN_AS_NODE' ]
107
111
try {
108
- context . logger . trace ( 'Trying to initialize remote extensions from gitpod.yml:' , extensions . map ( e => e . toString ( ) ) . join ( '\n' ) ) ;
109
- const { stderr } = await util . promisify ( cp . exec ) ( `${ codeCliPath } ${ args } ` ) ;
112
+ context . logger . info ( 'Trying to initialize remote extensions from gitpod.yml:' , extensions . map ( e => e . toString ( ) ) . join ( '\n' ) ) ;
113
+ const { stderr } = await util . promisify ( cp . exec ) ( `${ codeCliPath } ${ args } ` , { env : execEnv } ) ;
110
114
if ( stderr ) {
111
115
context . logger . error ( 'Failed to initialize remote extensions from gitpod.yml:' , stderr ) ;
112
116
}
0 commit comments